Code Review
/
common
/
bash_it.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
4476156
)
Added modern theme
author
Mark Szymanski
<mrman208@me.com>
Sun, 5 Dec 2010 21:40:46 +0000
(15:40 -0600)
committer
Mark Szymanski
<mrman208@me.com>
Sun, 5 Dec 2010 21:40:46 +0000
(15:40 -0600)
themes/modern/modern.theme.bash
[new file with mode: 0644]
patch
|
blob
diff --git a/themes/modern/modern.theme.bash
b/themes/modern/modern.theme.bash
new file mode 100644
(file)
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