From: Mark Szymanski Date: Sun, 19 Dec 2010 15:40:52 +0000 (-0600) Subject: Added feature to 'modern' theme to show if you are in vim's shell (achieved by the... X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=56d016aed1632cdf6561a759feb610ac4d542620;p=common%2Fbash_it.git Added feature to 'modern' theme to show if you are in vim's shell (achieved by the :sh command) --- diff --git a/themes/modern/modern.theme.bash b/themes/modern/modern.theme.bash index 0365276..8688f36 100644 --- a/themes/modern/modern.theme.bash +++ b/themes/modern/modern.theme.bash @@ -9,6 +9,13 @@ SCM_HG_CHAR='${bold_red}☿${normal}' PS3=">> " +is_vim_shell() { + if [ ! -z "$VIMRUNTIME" ] + then + echo "[${cyan}vim shell${normal}]" + fi +} + modern_scm_prompt() { CHAR=$(scm_char) if [ $CHAR = $SCM_NONE_CHAR ] @@ -25,10 +32,10 @@ prompt() { # Yes, the indenting on these is weird, but it has to be like # this otherwise it won't display properly. - PS1="${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\W${normal}] + PS1="${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) ${bold_red}└─▪${normal} " else - PS1="┌─$(modern_scm_prompt)[${cyan}\W${normal}] + PS1="┌─$(modern_scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) └─▪ " fi }