Permalink
Browse files

Finish up PS1 with git stuff

  • Loading branch information...
1 parent 7865f2d commit d488a133092549726694307ef8a93567a57c8c74 @fgrehm committed May 22, 2012
Showing with 11 additions and 28 deletions.
  1. +0 −1 bash/exports
  2. +11 −27 bash/git-ps1
View
@@ -1,3 +1,2 @@
export EDITOR=vim
-export PS1="\h • \W \$($( cat ~/.bash/git-ps1 ))$ "
export JRUBY_OPTS="--1.9"
View
@@ -39,32 +39,16 @@
#-----------------------------------------------------------------------------------------------
# colors
-case "$TERM" in
- xterm*|rxvt*|screen*)
- ESC="\033"
- RED="\[$ESC[01;31m\]"
- LIGHT_RED="\[$ESC[1;31m\]"
- GREEN="\[$ESC[01;32m\]"
- LIGHT_GREEN="\[$ESC[1;32m\]"
- GREY="\[$ESC[0;37m\]"
- CYAN="\[$ESC[01;36m\]"
- YELLOW="\[$ESC[0;33m\]"
- LIGHT_VIOLET="\[$ESC[1;35m\]"
- RESET="\[$ESC[0m\]"
- ;;
- *)
- ESC=""
- RED=""
- LIGHT_RED=""
- GREEN=""
- LIGHT_GREEN=""
- GREY=""
- CYAN=""
- YELLOW=""
- LIGHT_VIOLET=""
- RESET=""
- ;;
-esac
+ESC="\033"
+RED="\[$ESC[01;31m\]"
+LIGHT_RED="\[$ESC[1;31m\]"
+GREEN="\[$ESC[01;32m\]"
+LIGHT_GREEN="\[$ESC[1;32m\]"
+GREY="\[$ESC[0;37m\]"
+CYAN="\[$ESC[01;36m\]"
+YELLOW="\[$ESC[0;33m\]"
+LIGHT_VIOLET="\[$ESC[1;35m\]"
+RESET="\[$ESC[0m\]"
# prints path to git directory
__git_dirname() {
@@ -327,6 +311,6 @@ __git_prompt() {
marker="$RED"
fi
marker="${marker}\$${RESET}"
- PS1="${PS1} → \n\n${marker} "
+ PS1="${PS1} ${marker} "
}
PROMPT_COMMAND=__git_prompt

0 comments on commit d488a13

Please sign in to comment.