diff options
author | Marc Cornellà <marc.cornella@live.com> | 2018-09-26 17:23:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 17:23:31 +0200 |
commit | e107b85e3aedc644a7741917f914e5a5e350f4fb (patch) | |
tree | 5eff0fd8713c2662917e3e5bf633bc72c6482738 /themes | |
parent | 7f6e6cf346268a6d2cdf6fe167a60827aab53f0b (diff) | |
parent | a3d13eb76a19bbe18b6b843232695645bd9aa632 (diff) | |
download | zsh-e107b85e3aedc644a7741917f914e5a5e350f4fb.tar.gz zsh-e107b85e3aedc644a7741917f914e5a5e350f4fb.tar.bz2 zsh-e107b85e3aedc644a7741917f914e5a5e350f4fb.zip |
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.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/agnoster.zsh-theme | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 302de6e6f..1ac3fc96b 100644 --- a/themes/agnoster.zsh-theme +++ b/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}%}⚙" |