mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
lib: hide git_prompt_status when hide-status is set
Closes #4912 Closes #5137 Closes #8071
This commit is contained in:
parent
df58625ca6
commit
297238b739
1 changed files with 2 additions and 0 deletions
|
@ -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=""
|
||||||
|
|
Loading…
Reference in a new issue