]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Add history index to bash prompt
authorAlexander Barton <alex@barton.de>
Mon, 6 Jan 2014 15:59:21 +0000 (16:59 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 6 Jan 2014 15:59:21 +0000 (16:59 +0100)
sys/bashrc

index 91e94a48d906c19acf2d921a58662cdf947a1ea0..2e81d0a49ea27ac3e1237c444eb495bd6f2765d6 100644 (file)
@@ -77,6 +77,7 @@ case "$TERM" in
                COLOR_PROMPT_USER="\[\e[1;32m\]"
                COLOR_PROMPT_ROOT="\[\e[1;31m\]"
                COLOR_VCS="\[\e[1;33m\]"
+               COLOR_HISTORY=$reset
 
                # colors for less(1) pager
                export LESS_TERMCAP_mb=$'\E[1;33m'
@@ -111,7 +112,8 @@ PS1="${COLOR_PREPOSTTXT}${PS1_BEGIN:-<}"
        || PS1="${PS1}${COLOR_USER}\u${COLOR_AT}@"
 PS1="${PS1}${COLOR_HOST}\h"
 PS1="${PS1}${COLOR_COLON}:"
-PS1="${PS1}${COLOR_PATH}\$(PS1_Path)"
+PS1="${PS1}${COLOR_PATH}\$(PS1_Path) "
+PS1="${PS1}${COLOR_HISTORY}\!"
 PS1="${PS1}${COLOR_PREPOSTTXT}${PS1_END:->}${COLOR_RESET} "
 [ "$UID" -eq 0 ] \
        && PS1="${PS1}${COLOR_PROMPT_ROOT}\\\$${COLOR_RESET} " \