Skip to content

Commit

Permalink
my preferred prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrekle committed Feb 12, 2013
1 parent c615234 commit 1d62258
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function promptSetup () {
# setup the prompt sign
if [[ $VCS_TYPE != '' ]]; then
VCS_LINE+=$NOCOLOR
VCS_LINE+=' '
VCS_LINE+='$ '
case $VCS_TYPE in
'hg')
VCS_LINE+=' '
VCS_LINE+='$ '
VCS_CHANGES=`hg st 2>/dev/null | wc -l`
;;
'git')
Expand All @@ -48,7 +48,7 @@ function promptSetup () {

if [[ $VCS_CHANGES > 0 ]]; then
VCS_LINE+="%F{166}%B"
VCS_LINE+=' '
VCS_LINE+=' $ '
VCS_LINE+=$VCS_CHANGES
fi

Expand All @@ -66,7 +66,7 @@ function promptSetup () {
# we are on our home desktop
else
# we are outside on a server
PR_SIGN+="`hostname` "
#PR_SIGN+="`hostname` "
fi

# setup the main sign
Expand All @@ -75,7 +75,7 @@ function promptSetup () {
elif [[ $CURRENT_USER == 'vagrant' ]]; then
PR_SIGN+="𝓥"
else
PR_SIGN+=""
PR_SIGN+="$"
fi

PR_SIGN+="%F{white}%b"
Expand All @@ -87,6 +87,10 @@ function promptSetup () {

# Finally, the prompt.
PS1=$'\n' # newline (specially quotet, see zsh FAQ 3.13)
PS1+="%F{160}%B"
PS1+="[ `pwd` ]"
PS1+="%F{white}%b"
PS1+=$'\n'
PS1+="%{$terminfo_down_sc$VCS_LINE$terminfo[rc]%}" # the second line
PS1+=$PR_STITLE # tmux title if present
PS1+=$PR_VCSSIGN # version control part if present
Expand Down

0 comments on commit 1d62258

Please sign in to comment.