1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00

lib: hide git_prompt_status when hide-status is set

Closes #4912
Closes #5137
Closes #8071
This commit is contained in:
Michał Dębski 2016-03-11 16:59:40 +01:00 committed by Marc Cornellà
parent df58625ca6
commit 297238b739

View file

@ -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=""