From d411f2a584f93df431d3cf00e5950ea653f916fa Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 12 Jul 2013 09:52:33 +0200 Subject: [PATCH] new: added history config in default root ``.bashrc``. --- precise/base-0k/hooks/install | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/precise/base-0k/hooks/install b/precise/base-0k/hooks/install index 18011df..172f18e 100755 --- a/precise/base-0k/hooks/install +++ b/precise/base-0k/hooks/install @@ -82,7 +82,16 @@ EOF cat <> /root/.bashrc -# Prompt easy management +## History management + +export HISTCONTROL=ignoredups +export HISTSIZE=50000 +shopt -s histappend +PROMPT_COMMAND='history -a' + + +## Prompt easy management + prompt() { prompt_name="prompt.\$1.rc" @@ -93,6 +102,8 @@ prompt() { } +## Git log command + function glog() { git log --graph --pretty=tformat:%C\(yellow\ normal\)%h%Creset\ %C\(blue\ normal\)%an%Creset\ %s\ %Cgreen%d%Creset -n 20 "\$@" }