From 9748f419f08d8184eb19e8cb05b27e13286fca07 Mon Sep 17 00:00:00 2001 From: Martin Pander Date: Tue, 28 Feb 2023 21:02:51 +0100 Subject: [PATCH] Chnages to bash --- config/bashrc | 13 ++----------- config/zshrc | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/config/bashrc b/config/bashrc index ab36c6a..bf83ec3 100644 --- a/config/bashrc +++ b/config/bashrc @@ -1,14 +1,6 @@ # If not running interactively, don't do anything [ -z "$PS1" ] && return -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize @@ -52,7 +44,8 @@ shopt -s histappend shopt -s cmdhist # Record each line as it gets issued -PROMPT_COMMAND='history -a' +# PROMPT_COMMAND='history -a' +PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r" # Huge history. Doesn't appear to slow things down, so why not? HISTSIZE=500000 @@ -190,8 +183,6 @@ alias la="ls -A" alias ll="ls -lha" alias vim="nvim" -alias isas="ssh pander@i81server.ira.uka.de" - source ~/bin/autocomplete.sh # alias vims="vim -c \"call feedkeys(':source ~/.vim/obsessions/')\"" diff --git a/config/zshrc b/config/zshrc index e585da5..f2647aa 100644 --- a/config/zshrc +++ b/config/zshrc @@ -1,7 +1,22 @@ -# Lines configured by zsh-newuser-install +# Record each line as it gets issued +# PROMPT_COMMAND='history -a' +PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r" + +# Huge history. Doesn't appear to slow things down, so why not? +HISTSIZE=500000 +SAVEHIST=500000 +HISTFILESIZE=100000 + +# Avoid duplicate entries +HISTCONTROL="erasedups:ignoreboth" + +# Don't record some commands +export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear" + +# Useful timestamp format +HISTTIMEFORMAT='%F %T ' HISTFILE=~/.histfile -HISTSIZE=10000 -SAVEHIST=10000 + setopt autocd extendedglob unsetopt beep bindkey -v @@ -22,9 +37,6 @@ ZSH_HIGHLIGHT_STYLES=(cursor bold) export EDITOR=nvim export PATH="$HOME/bin:/usr/local/bin:$PATH" -export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH -# export PATH=/usr/local/MATLAB/R2015b/bin:/usr/local/MATLAB/R2015b/toolbox/local:$PATH -export PATH=/usr/local/MATLAB/R2016a/bin:/usr/local/MATLAB/R2016a/toolbox/local:$PATH [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh