modularized bash history

This commit is contained in:
Loic Nageleisen 2012-08-10 14:39:28 +02:00
parent a0f8f48016
commit cf509c03fc
2 changed files with 15 additions and 9 deletions

13
bash/history Normal file
View file

@ -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

11
bash/rc
View file

@ -1,16 +1,9 @@
## bashrc, called for interactive shells ## bashrc, called for interactive shells
# set a nice prompt
source $DOTFILES_BASH_DIR/prompt source $DOTFILES_BASH_DIR/prompt
source $DOTFILES_BASH_DIR/history
# ignore repeated, space-started, and casual commands # easy on spelling mistakes
export HISTIGNORE="&:[ ]*:l[sl]:[bf]g:exit"
# enable multiline single command
shopt -s cmdhist
# enable appending to histfile
shopt -s histappend
shopt -s cdspell shopt -s cdspell
# turn off distractive bells # turn off distractive bells