summaryrefslogtreecommitdiff
path: root/plugins/gitfast/git-prompt.sh
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-05-05 13:32:52 -0500
committerGitHub <noreply@github.com>2020-05-05 20:32:52 +0200
commit0736a3749a9c9ae4ba3096b0b6c55250f19fef17 (patch)
tree4114d2b757531a688f420b6fa738e3ad7de691bc /plugins/gitfast/git-prompt.sh
parentff987384cf721e7e0812636dea8100b485968bb2 (diff)
downloadzsh-0736a3749a9c9ae4ba3096b0b6c55250f19fef17.tar.gz
zsh-0736a3749a9c9ae4ba3096b0b6c55250f19fef17.tar.bz2
zsh-0736a3749a9c9ae4ba3096b0b6c55250f19fef17.zip
gitfast: proper synchronization (#8550)
Diffstat (limited to 'plugins/gitfast/git-prompt.sh')
-rw-r--r--plugins/gitfast/git-prompt.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh
index f7009b063..fd2b049db 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}"
@@ -237,7 +237,7 @@ __git_ps1_show_upstream ()
# to build a gitstring.
__git_ps1_colorize_gitstring ()
{
- if [[ -n "${ZSH_VERSION-}" ]]; then
+ if [[ -n ${ZSH_VERSION-} ]]; then
local c_red='%F{red}'
local c_green='%F{green}'
local c_lblue='%F{blue}'
@@ -255,7 +255,7 @@ __git_ps1_colorize_gitstring ()
local flags_color="$c_lblue"
local branch_color=""
- if [ "$detached" = no ]; then
+ if [ $detached = no ]; then
branch_color="$ok_color"
else
branch_color="$bad_color"
@@ -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,7 +522,7 @@ __git_ps1 ()
local f="$w$i$s$u"
local gitstring="$c$b${f:+$z$f}$r$p"
- if [ "$pcmode" = yes ]; then
+ if [ $pcmode = yes ]; then
if [ "${__git_printf_supports_v-}" != yes ]; then
gitstring=$(printf -- "$printf_format" "$gitstring")
else