diff options
author | June McEnroe <programble@gmail.com> | 2016-09-04 13:12:41 -0400 |
---|---|---|
committer | June McEnroe <programble@gmail.com> | 2016-09-04 13:12:41 -0400 |
commit | 4a7269cbd3e269e6349682ac54c82ae1057d8ffd (patch) | |
tree | 6bbcce09006030191bf7972388f40946bce75ab2 | |
parent | Color rubyStringDelimiter as String (diff) | |
download | src-4a7269cbd3e269e6349682ac54c82ae1057d8ffd.tar.gz src-4a7269cbd3e269e6349682ac54c82ae1057d8ffd.zip |
Simplify colors syntax in zsh prompt
-rw-r--r-- | .zshrc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.zshrc b/.zshrc index 97487520..c664866d 100644 --- a/.zshrc +++ b/.zshrc @@ -43,7 +43,7 @@ alias gd='git diff' alias gl='git log --graph --pretty=log' setopt prompt_subst -[[ -n "$SSH_CLIENT" ]] && _prompt_ssh="$fg[magenta]" +[[ -n "$SSH_CLIENT" ]] && _prompt_ssh='%F{magenta}' _prompt_git() { local dotgit=.git head [[ -d "$dotgit" ]] || dotgit=../.git @@ -54,8 +54,8 @@ _prompt_git() { *) echo ":${head:0:7}";; esac } -PROMPT='%{%(?.$fg[green]$_prompt_ssh.$fg[red])%}»%{$reset_color%} ' -RPROMPT='%{$fg[blue]%}%50<…<%~%{$fg[yellow]%}$(_prompt_git)%{$reset_color%}' +PROMPT="%(?.%F{green}$_prompt_ssh.%F{red})»%f " +RPROMPT='%F{blue}%50<…<%~%F{yellow}$(_prompt_git)%f' typeset -ga preexec_functions precmd_functions |