From fb3045131b2e97ed872687f8d546f053f9e72bd7 Mon Sep 17 00:00:00 2001 From: xylous Date: Wed, 15 Sep 2021 20:03:35 +0300 Subject: [PATCH] Use zsh's builtin %F{} instead of ANSI codes --- gitstatus.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gitstatus.plugin.zsh b/gitstatus.plugin.zsh index 3e4a173..581afc4 100755 --- a/gitstatus.plugin.zsh +++ b/gitstatus.plugin.zsh @@ -38,7 +38,7 @@ function gitstatus() output+="$staged" output+="$deleted" output+="$untracked" - output+=$'\e[0m' + output+=$'%F{default}' sed 's/[ ]+$//' <<<"$output" # remove trailing whitespace @@ -136,8 +136,8 @@ function git_local_remote_diffs() ### function git_determine_color() { - local green=$'\e[93m' - local yellow=$'\e[92m' + local green=$'%F{yellow}' + local yellow=$'%F{green}' for i in "$@"; do if (( $i > 0 )); then typeset -g REPLY="$green"