From 8a3d525460da73b57fb9edfb82f32e35af767047 Mon Sep 17 00:00:00 2001 From: Mark Szymanski Date: Sun, 5 Dec 2010 15:40:46 -0600 Subject: [PATCH] Added modern theme --- themes/modern/modern.theme.bash | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 themes/modern/modern.theme.bash 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 -- 2.17.1