Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
4fb50b33
Unverified
Commit
4fb50b33
authored
Sep 08, 2019
by
Marc Cornellà
Committed by
GitHub
Sep 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unquote yes in conditional expressions for style consistency
parent
1f58cd92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
git-prompt.sh
plugins/gitfast/git-prompt.sh
+5
-5
No files found.
plugins/gitfast/git-prompt.sh
View file @
4fb50b33
...
@@ -219,7 +219,7 @@ __git_ps1_show_upstream ()
...
@@ -219,7 +219,7 @@ __git_ps1_show_upstream ()
if
[[
-n
"
$count
"
&&
-n
"
$name
"
]]
;
then
if
[[
-n
"
$count
"
&&
-n
"
$name
"
]]
;
then
__git_ps1_upstream_name
=
$(
git rev-parse
\
__git_ps1_upstream_name
=
$(
git rev-parse
\
--abbrev-ref
"
$upstream
"
2>/dev/null
)
--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}"
p
=
"
$p
\$
{__git_ps1_upstream_name}"
else
else
p
=
"
$p
${
__git_ps1_upstream_name
}
"
p
=
"
$p
${
__git_ps1_upstream_name
}
"
...
@@ -508,13 +508,13 @@ __git_ps1 ()
...
@@ -508,13 +508,13 @@ __git_ps1 ()
# NO color option unless in PROMPT_COMMAND mode or it's Zsh
# NO color option unless in PROMPT_COMMAND mode or it's Zsh
if
[
-n
"
${
GIT_PS1_SHOWCOLORHINTS
-
}
"
]
;
then
if
[
-n
"
${
GIT_PS1_SHOWCOLORHINTS
-
}
"
]
;
then
if
[
"
$pcmode
"
=
"yes"
]
||
[
-n
"
${
ZSH_VERSION
-
}
"
]
;
then
if
[
"
$pcmode
"
=
yes
]
||
[
-n
"
${
ZSH_VERSION
-
}
"
]
;
then
__git_ps1_colorize_gitstring
__git_ps1_colorize_gitstring
fi
fi
fi
fi
b
=
${
b
##refs/heads/
}
b
=
${
b
##refs/heads/
}
if
[
"
$pcmode
"
=
"yes"
]
&&
[
"
$ps1_expanded
"
=
"yes"
]
;
then
if
[
"
$pcmode
"
=
yes
]
&&
[
"
$ps1_expanded
"
=
yes
]
;
then
__git_ps1_branch_name
=
$b
__git_ps1_branch_name
=
$b
b
=
"
\$
{__git_ps1_branch_name}"
b
=
"
\$
{__git_ps1_branch_name}"
fi
fi
...
@@ -522,8 +522,8 @@ __git_ps1 ()
...
@@ -522,8 +522,8 @@ __git_ps1 ()
local
f
=
"
$w$i$s$u
"
local
f
=
"
$w$i$s$u
"
local
gitstring
=
"
$c$b
${
f
:+
$z$f
}
$r$p
"
local
gitstring
=
"
$c$b
${
f
:+
$z$f
}
$r$p
"
if
[
"
$pcmode
"
=
"yes"
]
;
then
if
[
"
$pcmode
"
=
yes
]
;
then
if
[
"
${
__git_printf_supports_v
-
}
"
!=
"yes"
]
;
then
if
[
"
${
__git_printf_supports_v
-
}
"
!=
yes
]
;
then
gitstring
=
$(
printf
--
"
$printf_format
"
"
$gitstring
"
)
gitstring
=
$(
printf
--
"
$printf_format
"
"
$gitstring
"
)
else
else
printf
-v
gitstring
--
"
$printf_format
"
"
$gitstring
"
printf
-v
gitstring
--
"
$printf_format
"
"
$gitstring
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment