helm/zsh/prompt

40 lines
774 B
Plaintext
Raw Normal View History

2013-03-07 00:58:05 -08:00
#!/bin/bash
2013-03-03 05:49:37 -08:00
2013-03-16 11:29:30 -07:00
function short_pwd() {
SHORTPWD=`print -Pn "%4~"`
[[ "${SHORT_PWD:0:1}" =~ "[^/~]" ]] && SHORT_PWD=".../$SHORT_PWD"
echo $SHORTPWD
}
# GIT Stuff
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}+%{$fg[white]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
##################
# Build Prompt #
##################
# Left side
2013-03-03 05:49:37 -08:00
PROMPT="
2013-03-16 11:29:30 -07:00
"
2013-03-16 11:45:53 -07:00
PROMPT+="%{$FX[bold]%}"
2013-03-16 11:29:30 -07:00
if [[ -n $SSH_CLIENT ]]; then
2013-03-16 11:45:53 -07:00
PROMPT+="%{$BG[236]%}"
2013-03-16 11:29:30 -07:00
PROMPT+="%{$fg[white]%}$(hostname)%{$reset_color%} "
2013-03-16 11:45:53 -07:00
else
PROMPT+="%{$BG[234]%}"
2013-03-16 11:29:30 -07:00
fi
PROMPT+="%{$fg[cyan]%}"
PROMPT+="$ "
PROMPT+="%{$fg[white]%}"
2013-03-03 05:49:37 -08:00
2013-03-16 11:29:30 -07:00
# Right side
RPROMPT="%{$fg[cyan]%}"
RPROMPT+='$(short_pwd)'
RPROMPT+='$(git_prompt_info)'
RPROMPT+='%{$reset_color%}'