Commit 297238b7 authored by Michał Dębski's avatar Michał Dębski Committed by Marc Cornellà
Browse files

lib: hide git_prompt_status when hide-status is set

Closes #4912
Closes #5137
Closes #8071
parent df58625c
...@@ -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=""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment