summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcatull <catull@users.noreply.github.com>2017-11-14 15:36:53 +0100
committerRobby Russell <robby@planetargon.com>2017-11-14 06:36:53 -0800
commitd792b1114c570ec1520ba7696c5c110d10cea41c (patch)
treef4c709bffe6e9a6194550df75d18f0ae06c17d0e
parent510d90749f156ef5f10b656630191df13a86e989 (diff)
downloadzsh-d792b1114c570ec1520ba7696c5c110d10cea41c.tar.gz
zsh-d792b1114c570ec1520ba7696c5c110d10cea41c.tar.bz2
zsh-d792b1114c570ec1520ba7696c5c110d10cea41c.zip
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)
-rw-r--r--lib/git.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index f7eccb81d..167b4b0ea 100644
--- a/lib/git.zsh
+++ b/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