diff --git a/bash/history b/bash/history new file mode 100644 index 0000000..8018fa8 --- /dev/null +++ b/bash/history @@ -0,0 +1,13 @@ +# ignore repeated, space-started, and casual commands +export HISTIGNORE="&:[ ]*:l[sl]:[bf]g:exit" + +# enable multiline historization as a single line +shopt -s cmdhist + +# enable appending to histfile +shopt -s histappend + +# ignore sequential duplicates +export HISTCONTROL=ignoreboth + +# vim: ft=sh diff --git a/bash/rc b/bash/rc index b4744dd..e7d6b1c 100644 --- a/bash/rc +++ b/bash/rc @@ -1,16 +1,9 @@ ## bashrc, called for interactive shells -# set a nice prompt source $DOTFILES_BASH_DIR/prompt +source $DOTFILES_BASH_DIR/history -# ignore repeated, space-started, and casual commands -export HISTIGNORE="&:[ ]*:l[sl]:[bf]g:exit" - -# enable multiline single command -shopt -s cmdhist - -# enable appending to histfile -shopt -s histappend +# easy on spelling mistakes shopt -s cdspell # turn off distractive bells