浏览代码

With zsh 5.4 a simple "local FLAGS" meant as an array must be explicitly declared so. This fix avoids the dreaded "parse_git_dirty:3: FLAGS: attempt to assign array value to non-array". (#6414)

catull 7 年之前
父节点
当前提交
d792b1114c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/git.zsh

+ 1 - 1
lib/git.zsh

@@ -11,7 +11,7 @@ function git_prompt_info() {
 # Checks if working tree is dirty
 function parse_git_dirty() {
   local STATUS=''
-  local FLAGS
+  local -a FLAGS
   FLAGS=('--porcelain')
   if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then
     if [[ $POST_1_7_2_GIT -gt 0 ]]; then