Permalink
Browse files

Added my personal theme

  • Loading branch information...
1 parent 63a00c7 commit bbd443699723bad12a00a9a5cf3ff35435318326 @agos committed May 9, 2011
Showing with 43 additions and 0 deletions.
  1. +43 −0 themes/ago/ago.theme.bash
View
@@ -0,0 +1,43 @@
+if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi
+
+SCM_THEME_PROMPT_PREFIX=""
+SCM_THEME_PROMPT_SUFFIX=""
+
+SCM_THEME_PROMPT_DIRTY=' \[${bold_red}\]✗\[${normal}\]'
+SCM_THEME_PROMPT_CLEAN=' \[${bold_green}\]✓\[${normal}\]'
+SCM_GIT_CHAR='\[${bold_green}\]±\[${normal}\]'
+SCM_SVN_CHAR='\[${bold_cyan}\]⑆\[${normal}\]'
+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 ]
+ then
+ return
+ else
+ echo "[$(scm_char) $(scm_prompt_info)]"
+ fi
+}
+
+prompt() {
+# Test per vedere se il comando precendente è andato male
+ if [ $? -ne 0 ]
+ then
+ PS1="\[${bold_red}\]!\[${reset_color}\]\u[\[${cyan}\]\W\[${normal}\]]$(modern_scm_prompt)$(is_vim_shell) "
+ else
+ PS1="\u[\[${cyan}\]\W\[${normal}\]]$(modern_scm_prompt)$(is_vim_shell) "
+ fi
+}
+
+PS2="└─▪ "
+
+PROMPT_COMMAND=prompt

0 comments on commit bbd4436

Please sign in to comment.