mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
Unquote yes in conditional expressions for style consistency
This commit is contained in:
parent
1f58cd92dd
commit
4fb50b3333
1 changed files with 5 additions and 5 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue