From 9418dabc55c3cf97b2186bbc05dce2b373ce118f Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 22 Feb 2012 21:41:34 +0100 Subject: [PATCH] history hacks --- .bashrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.bashrc b/.bashrc index 1f39c2f..8d003e0 100644 --- a/.bashrc +++ b/.bashrc @@ -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" '