Browse Source

agnoster: fix prompt_status error (#6450)

This commit fixes the runtime error that says:

  prompt_status:2: symbols: attempt to assign array value to non-array

It trips over a local array which is not properly declared.
Marc Cornellà 5 years ago
parent
commit
e107b85e3a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      themes/agnoster.zsh-theme

+ 2 - 2
themes/agnoster.zsh-theme

@@ -215,8 +215,8 @@ prompt_virtualenv() {
 # - am I root
 # - are there background jobs?
 prompt_status() {
-  local symbols
-  symbols=()
+  local -a symbols
+
   [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
   [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
   [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"