From: Mark Szymanski Date: Sun, 5 Dec 2010 21:40:46 +0000 (-0600) Subject: Added modern theme X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=8a3d525460da73b57fb9edfb82f32e35af767047;p=common%2Fbash_it.git Added modern theme --- diff --git a/themes/modern/modern.theme.bash b/themes/modern/modern.theme.bash new file mode 100644 index 0000000..85bcfe0 --- /dev/null +++ b/themes/modern/modern.theme.bash @@ -0,0 +1,27 @@ +SCM_THEME_PROMPT_PREFIX="" +SCM_THEME_PROMPT_SUFFIX="" + +modern_scm_prompt() { + CHAR=$(scm_char) + if [ $CHAR = $SCM_NONE_CHAR ] + then + return + else + echo "[$(scm_char)][$(scm_prompt_info)]" + fi +} + +prompt() { + if [ $? -ne 0 ] + then + PS1="${bold_red}┌─${reset_color}$(modern_scm_prompt)[\W] +${bold_red}└─▪${normal} " + else + PS1="┌─$(modern_scm_prompt)[\W] +└─▪ " + fi +} + + + +PROMPT_COMMAND=prompt