Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
297238b7
Commit
297238b7
authored
Mar 11, 2016
by
Michał Dębski
Committed by
Marc Cornellà
Oct 09, 2020
Browse files
lib: hide git_prompt_status when hide-status is set
Closes #4912 Closes #5137 Closes #8071
parent
df58625c
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/git.zsh
View file @
297238b7
...
@@ -151,6 +151,8 @@ function git_prompt_long_sha() {
...
@@ -151,6 +151,8 @@ function git_prompt_long_sha() {
function
git_prompt_status
()
{
function
git_prompt_status
()
{
emulate
-L
zsh
emulate
-L
zsh
[[
"
$(
__git_prompt_git config
--get
oh-my-zsh.hide-status 2>/dev/null
)
"
=
1
]]
&&
return
local
INDEX STATUS
local
INDEX STATUS
INDEX
=
$(
__git_prompt_git status
--porcelain
-b
2> /dev/null
)
||
return
0
INDEX
=
$(
__git_prompt_git status
--porcelain
-b
2> /dev/null
)
||
return
0
STATUS
=
""
STATUS
=
""
...
...
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