From c30d513f0f15d2554b332786002e2bbba43248a1 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 6 Jan 2014 16:59:21 +0100 Subject: [PATCH] Add history index to bash prompt --- sys/bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/bashrc b/sys/bashrc index 91e94a4..2e81d0a 100644 --- a/sys/bashrc +++ b/sys/bashrc @@ -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} " \ -- 2.39.2