浏览代码

lib: hide git_prompt_status when hide-status is set

Closes #4912
Closes #5137
Closes #8071
Michał Dębski 8 年之前
父节点
当前提交
297238b739
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/git.zsh

+ 2 - 0
lib/git.zsh

@@ -151,6 +151,8 @@ function git_prompt_long_sha() {
 function git_prompt_status() {
   emulate -L zsh
 
+  [[ "$(__git_prompt_git config --get oh-my-zsh.hide-status 2>/dev/null)" = 1 ]] && return
+
   local INDEX STATUS
   INDEX=$(__git_prompt_git status --porcelain -b 2> /dev/null) || return 0
   STATUS=""