summary refs log tree commit diff
path: root/.zshrc
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2016-09-04 13:12:41 -0400
committerJune McEnroe <june@causal.agency>2016-09-04 13:12:41 -0400
commitcd8c704134fdeed46d03373b88fdce3ce88d9464 (patch)
tree5511ff0e6070b28d5c68af6f862cf08320d247c8 /.zshrc
parentColor rubyStringDelimiter as String (diff)
downloadsrc-cd8c704134fdeed46d03373b88fdce3ce88d9464.tar.gz
src-cd8c704134fdeed46d03373b88fdce3ce88d9464.zip
Simplify colors syntax in zsh prompt
Diffstat (limited to '')
-rw-r--r--.zshrc6
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
 
ae093a9a227a17&follow=1'>Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe