Updated the color themes. Added underline and background colors.
authorRobert R Evans <robert@codewranglers.org>
Sat, 9 Oct 2010 22:01:50 +0000 (15:01 -0700)
committerRobert R Evans <robert@codewranglers.org>
Sat, 9 Oct 2010 22:01:50 +0000 (15:01 -0700)
themes/base.theme.bash
themes/candy/candy.theme.bash
themes/clean/clean.theme.bash
themes/colors.theme.bash
themes/simple/simple.theme.bash
themes/standard/standard.theme.bash

index 98d295a..8e2e2ee 100644 (file)
@@ -2,20 +2,20 @@
 
 # Stolen from Steve Losh
 function prompt_char {
-    git branch >/dev/null 2>/dev/null && echo '±' && return
-    hg root >/dev/null 2>/dev/null && echo '☿' && return
-    echo '○'
+    git branch >/dev/null 2>/dev/null && echo -e '±' && return
+    hg root >/dev/null 2>/dev/null && echo -e '☿' && return
+    echo -e '○'
 }
 
 function parse_git_dirty {
   if [[ -n $(git status -s 2> /dev/null) ]]; then
-    echo "$GIT_THEME_PROMPT_DIRTY"
+    echo -e "$GIT_THEME_PROMPT_DIRTY"
   else
-    echo "$GIT_THEME_PROMPT_CLEAN"
+    echo -e "$GIT_THEME_PROMPT_CLEAN"
   fi
 }
 
 function git_prompt_info() {
   ref=$(git symbolic-ref HEAD 2> /dev/null) || return
-  echo "$GIT_THEME_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$GIT_THEME_PROMPT_SUFFIX"
+  echo -e "$GIT_THEME_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$GIT_THEME_PROMPT_SUFFIX"
 }
\ No newline at end of file
index f2a5db2..7158a9e 100644 (file)
@@ -1,2 +1,2 @@
 #!/bin/bash
-PROMPT='${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}$(git_prompt_info)${blue} →${bold_blue} \$${reset_color} '
\ No newline at end of file
+PROMPT="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}\[\$(git_prompt_info)\]${blue} →${bold_blue} \$${reset_color} "
\ No newline at end of file
index e84c2e0..88949fd 100644 (file)
@@ -1,6 +1,6 @@
 if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi
 
-PROMPT='${no_color}\u${reset_color}:${blue}\W/${reset_color} $(git_prompt_info)$ '
+PROMPT="${no_color}\u${reset_color}:${blue}\W/${reset_color} \[\$(git_prompt_info)\]$ "
 RPROMPT='[\t]'
 
 
index ae8f616..9aa253f 100644 (file)
@@ -1,81 +1,44 @@
 #!/bin/bash
 
-green=$'\e[0;32m'
-red=$'\e[0;31m'
-blue=$'\e[0;34m'
-white=$'\e[1;37m'
 black=$'\e[0;30m'
+red=$'\e[0;31m'
+green=$'\e[0;32m'
 yellow=$'\e[0;33m'
+blue=$'\e[0;34m'
 purple=$'\e[0;35m'
 cyan=$'\e[0;36m'
+white=$'\e[1;37m'
 orange=$'\e[33;40m'
 
-
-bold_green=$'\e[1;32m'
+bold_black=$'\e[1;30m'
 bold_red=$'\e[1;31m'
-bold_blue=$'\e[1;34m'
+bold_green=$'\e[1;32m'
 bold_yellow=$'\e[1;33m'
+bold_blue=$'\e[1;34m'
 bold_purple=$'\e[1;35m'
 bold_cyan=$'\e[1;36m'
+bold_white=$'\e[1;37m'
 bold_orange=$'\e[1;33;40m'
 
-normal=$'\e[00m'
-reset_color=$'\e[39m'
+underline_black=$'\e[4;30m'
+underline_red=$'\e[4;31m'
+underline_green=$'\e[4;32m'
+underline_yellow=$'\e[4;33m'
+underline_blue=$'\e[4;34m'
+underline_purple=$'\e[4;35m'
+underline_cyan=$'\e[4;36m'
+underline_white=$'\e[4;37m'
+underline_orange=$'\e[4;33;40m'
 
+background_black=$'\e[40m'
+background_red=$'\e[41m'
+background_green=$'\e[42m'
+background_yellow=$'\e[43m'
+background_blue=$'\e[44m'
+background_purple=$'\e[45m'
+background_cyan=$'\e[46m'
+background_white=$'\e[47m'
 
 
-# ESC="\033"
-# NON_BOLD=0
-# BOLD=1
-# 
-# # Foreground
-# FG_BLACK=30
-# FG_RED=31
-# FG_GREEN=32
-# FG_YELLOW=33
-# FG_BLUE=34
-# FG_VIOLET=35
-# FG_CYAN=36
-# FG_WHITE=37
-# FG_ORANGE='33;40'
-# FG_NULL=00
-# 
-# # Background
-# BG_BLACK=40
-# BG_RED=41
-# BG_GREEN=42
-# BG_YELLOW=43
-# BG_BLUE=44
-# BG_VIOLET=45
-# BG_CYAN=46
-# BG_WHITE=47
-# BG_NULL=00
-# 
-# 
-# normal="\[$ESC[m\]"
-# reset_color="\[$ESC[${NON_BOLD};${FG_WHITE};${BG_NULL}m\]"
-# 
-# 
-# 
-# # Non-bold
-# black="\[$ESC[${NON_BOLD};${FG_BLACK}m\]"
-# red="\[$ESC[${NON_BOLD};${FG_RED}m\]"
-# green="\[$ESC[${NON_BOLD};${FG_GREEN}m\]"
-# yellow="\[$ESC[${NON_BOLD};${FG_YELLOW}m\]"
-# blue="\[$ESC[${NON_BOLD};${FG_BLUE}m\]"
-# purple="\[$ESC[${NON_BOLD};${FG_VIOLET}m\]"
-# cyan="\[$ESC[${NON_BOLD};${FG_CYAN}m\]"
-# white="\[$ESC[${NON_BOLD};${FG_WHITE}m\]"
-# orange="\[$ESC[${NON_BOLD};${FG_ORANGE}m\]"
-# 
-# 
-# # Bold
-# bold_black="\[$ESC[${BOLD};${FG_BLACK}m\]"
-# bold_red="\[$ESC[${BOLD};${FG_RED}m\]"
-# bold_green="\[$ESC[${BOLD};${FG_GREEN}m\]"
-# bold_yellow="\[$ESC[${BOLD};${FG_YELLOW}m\]"
-# bold_blue="\[$ESC[${BOLD};${FG_BLUE}m\]"
-# bold_purple="\[$ESC[${BOLD};${FG_VIOLET}m\]"
-# bold_cyan="\[$ESC[${BOLD};${FG_CYAN}m\]"
-# bold_white="\[$ESC[${BOLD};${FG_WHITE}m\]"
-# bold_orange="\[$ESC[${BOLD};${FG_ORANGE}m\]"
\ No newline at end of file
+normal=$'\e[00m'
+reset_color=$'\e[39m'
\ No newline at end of file
index be28af5..5a8d5d9 100644 (file)
@@ -11,7 +11,7 @@ case $TERM in
        TITLEBAR=""
        ;;
 esac
-PROMPT="${TITLEBAR}${orange}${reset_color}${green}\w${bold_blue}\$(git_prompt_info)${reset_color} "
+PROMPT="${TITLEBAR}${orange}${reset_color}${green}\w${bold_blue}\[\$(git_prompt_info)\]${reset_color} "
 
 
 # git themeing
index ce99709..10caf7f 100644 (file)
@@ -1,5 +1,7 @@
 PROMPT='\[${green}\]\u\[${normal}\]@\[${green}\]\h\[${normal}\]:\[${blue}\]\w\[${normal}\]\[${red}\]$(prompt_char)$(git_prompt_info)\[${normal}\]\$ '
 
+
+
 # git themeing
 GIT_THEME_PROMPT_DIRTY="×"
 GIT_THEME_PROMPT_CLEAN="✓"