history hacks

This commit is contained in:
nojhan 2012-02-22 21:41:34 +01:00
commit 9418dabc55

12
.bashrc
View file

@ -157,6 +157,18 @@ alias clean='mv *~ ~/.Trash/'
# do not permits to recall dangerous commands in bash history
export HISTIGNORE='&:[bf]g:exit:*>|*:history*::*rm*-rf*:*rm*-f*'
# append history rather than overwrite
shopt -s histappend
unset HISTFILESIZE
HISTSIZE=1000000
# ignore commands that start with a space AND duplicate commands
HISTCONTROL=ignoreboth
# add the full date and time to lines
HISTTIMEFORMAT='%F %T'
# one command per line
shopt -s cmdhist
# store history immediately
PROMPT_COMMAND='history -a; history -n'
# baskcup shortcuts
alias rcp='rsync -avz --rsh "ssh -l nojhan" '