diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-09-08 20:28:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-08 20:28:59 +0200 |
commit | 4fb50b3333ce8685ce3b6570ef5e075ce2633b6a (patch) | |
tree | 3185e718381713a85d898cf4903e8b8c6d371e8f /plugins/gitfast | |
parent | 1f58cd92ddb94fb75e4fb45f231eebfd55aa19dd (diff) | |
download | zsh-4fb50b3333ce8685ce3b6570ef5e075ce2633b6a.tar.gz zsh-4fb50b3333ce8685ce3b6570ef5e075ce2633b6a.tar.bz2 zsh-4fb50b3333ce8685ce3b6570ef5e075ce2633b6a.zip |
Unquote yes in conditional expressions for style consistency
Diffstat (limited to 'plugins/gitfast')
-rw-r--r-- | plugins/gitfast/git-prompt.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh index 3e86e9cca..f7009b063 100644 --- a/plugins/gitfast/git-prompt.sh +++ b/plugins/gitfast/git-prompt.sh @@ -219,7 +219,7 @@ __git_ps1_show_upstream () if [[ -n "$count" && -n "$name" ]]; then __git_ps1_upstream_name=$(git rev-parse \ --abbrev-ref "$upstream" 2>/dev/null) - if [ "$pcmode" = "yes" ] && [ "$ps1_expanded" = "yes" ]; then + if [ "$pcmode" = yes ] && [ "$ps1_expanded" = yes ]; then p="$p \${__git_ps1_upstream_name}" else p="$p ${__git_ps1_upstream_name}" @@ -508,13 +508,13 @@ __git_ps1 () # NO color option unless in PROMPT_COMMAND mode or it's Zsh if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then - if [ "$pcmode" = "yes" ] || [ -n "${ZSH_VERSION-}" ]; then + if [ "$pcmode" = yes ] || [ -n "${ZSH_VERSION-}" ]; then __git_ps1_colorize_gitstring fi fi b=${b##refs/heads/} - if [ "$pcmode" = "yes" ] && [ "$ps1_expanded" = "yes" ]; then + if [ "$pcmode" = yes ] && [ "$ps1_expanded" = yes ]; then __git_ps1_branch_name=$b b="\${__git_ps1_branch_name}" fi @@ -522,8 +522,8 @@ __git_ps1 () local f="$w$i$s$u" local gitstring="$c$b${f:+$z$f}$r$p" - if [ "$pcmode" = "yes" ]; then - if [ "${__git_printf_supports_v-}" != "yes" ]; then + if [ "$pcmode" = yes ]; then + if [ "${__git_printf_supports_v-}" != yes ]; then gitstring=$(printf -- "$printf_format" "$gitstring") else printf -v gitstring -- "$printf_format" "$gitstring" |