From cf509c03fc72a3259ec1a0879538538dfbe77360 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Fri, 10 Aug 2012 14:39:28 +0200 Subject: [PATCH] modularized bash history --- bash/history | 13 +++++++++++++ bash/rc | 11 ++--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 bash/history 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