提交 d792b111 编写于 作者: C catull 提交者: Robby Russell

With zsh 5.4 a simple "local FLAGS" meant as an array must be explicitly...

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)
上级 510d9074
...@@ -11,7 +11,7 @@ function git_prompt_info() { ...@@ -11,7 +11,7 @@ function git_prompt_info() {
# Checks if working tree is dirty # Checks if working tree is dirty
function parse_git_dirty() { function parse_git_dirty() {
local STATUS='' local STATUS=''
local FLAGS local -a FLAGS
FLAGS=('--porcelain') FLAGS=('--porcelain')
if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then
if [[ $POST_1_7_2_GIT -gt 0 ]]; then if [[ $POST_1_7_2_GIT -gt 0 ]]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册