4fb50b3333ce8685ce3b6570ef5e075ce2633b6a
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Unquote yes in conditional expressions for style consistency
Diff
1diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh
2index 3e86e9ccab3e14d5a27c796ea5977e88151da127..f7009b063342d940c0e1dfce6b2207f46373330b 100644
3--- a/plugins/gitfast/git-prompt.sh
4+++ b/plugins/gitfast/git-prompt.sh
5@@ -219,7 +219,7 @@ __git_ps1_show_upstream ()
6 if [[ -n "$count" && -n "$name" ]]; then
7 __git_ps1_upstream_name=$(git rev-parse \
8 --abbrev-ref "$upstream" 2>/dev/null)
9- if [ "$pcmode" = "yes" ] && [ "$ps1_expanded" = "yes" ]; then
10+ if [ "$pcmode" = yes ] && [ "$ps1_expanded" = yes ]; then
11 p="$p \${__git_ps1_upstream_name}"
12 else
13 p="$p ${__git_ps1_upstream_name}"
14@@ -508,13 +508,13 @@ __git_ps1 ()
15
16 # NO color option unless in PROMPT_COMMAND mode or it's Zsh
17 if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
18- if [ "$pcmode" = "yes" ] || [ -n "${ZSH_VERSION-}" ]; then
19+ if [ "$pcmode" = yes ] || [ -n "${ZSH_VERSION-}" ]; then
20 __git_ps1_colorize_gitstring
21 fi
22 fi
23
24 b=${b##refs/heads/}
25- if [ "$pcmode" = "yes" ] && [ "$ps1_expanded" = "yes" ]; then
26+ if [ "$pcmode" = yes ] && [ "$ps1_expanded" = yes ]; then
27 __git_ps1_branch_name=$b
28 b="\${__git_ps1_branch_name}"
29 fi
30@@ -522,8 +522,8 @@ __git_ps1 ()
31 local f="$w$i$s$u"
32 local gitstring="$c$b${f:+$z$f}$r$p"
33
34- if [ "$pcmode" = "yes" ]; then
35- if [ "${__git_printf_supports_v-}" != "yes" ]; then
36+ if [ "$pcmode" = yes ]; then
37+ if [ "${__git_printf_supports_v-}" != yes ]; then
38 gitstring=$(printf -- "$printf_format" "$gitstring")
39 else
40 printf -v gitstring -- "$printf_format" "$gitstring"