1
0
Fork 0
mirror of synced 2024-11-22 23:35:35 -05:00

update steeef prompt

This commit is contained in:
Matt Hamilton 2015-12-22 09:47:19 -05:00
parent 7d8601089a
commit 6fa8dcb95d

View file

@ -10,7 +10,7 @@
export VIRTUAL_ENV_DISABLE_PROMPT=1 export VIRTUAL_ENV_DISABLE_PROMPT=1
function virtualenv_info { function virtualenv_info {
[ $VIRTUAL_ENV ] && print '('%F{blue}`basename $VIRTUAL_ENV`%f') ' [ $VIRTUAL_ENV ] && print '('${fg[blue]}`basename $VIRTUAL_ENV`%{${reset_color}%}') '
} }
PR_GIT_UPDATE=1 PR_GIT_UPDATE=1
@ -18,20 +18,21 @@ setopt prompt_subst
autoload -Uz add-zsh-hook autoload -Uz add-zsh-hook
autoload -Uz vcs_info autoload -Uz vcs_info
autoload -Uz colors && colors
#use extended color pallete if available #use extended color pallete if available
if [[ $terminfo[colors] -ge 256 ]]; then if [[ ${TERM} == *256* || ${TERM} == *rxvt* ]]; then
turquoise="%F{81}" turquoise="%F{81}"
orange="%F{166}" orange="%F{166}"
purple="%F{135}" purple="%F{135}"
hotpink="%F{161}" hotpink="%F{161}"
limegreen="%F{118}" limegreen="%F{118}"
else else
turquoise="%F{cyan}" turquoise="$fg[cyan]"
orange="%F{yellow}" orange="$fg[yellow]"
purple="%F{magenta}" purple="$fg[magenta]"
hotpink="%F{red}" hotpink="$fg[red]"
limegreen="%F{green}" limegreen="$fg[green]"
fi fi
# enable VCS systems you use # enable VCS systems you use
@ -48,7 +49,7 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true
# %a - action (e.g. rebase-i) # %a - action (e.g. rebase-i)
# %R - repository path # %R - repository path
# %S - path in the repository # %S - path in the repository
PR_RST="%f" PR_RST="%{${reset_color}%}"
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})" FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
FMT_ACTION="(%{$limegreen%}%a${PR_RST})" FMT_ACTION="(%{$limegreen%}%a${PR_RST})"
FMT_UNSTAGED="%{$orange%}●" FMT_UNSTAGED="%{$orange%}●"
@ -96,5 +97,5 @@ function steeef_precmd {
add-zsh-hook precmd steeef_precmd add-zsh-hook precmd steeef_precmd
PROMPT=$' PROMPT=$'
%{$purple%}%n${PR_RST} at %{$orange%}%m${PR_RST} in %{$limegreen%}%~${PR_RST} $vcs_info_msg_0_$(virtualenv_info) %{$purple%}%n${${reset_color}%} at %{$orange%}%m${${reset_color}%} in %{$limegreen%}%~${${reset_color}%} $vcs_info_msg_0_$(virtualenv_info)%{${reset_color}%}
$ ' $ '