e107b85e3aedc644a7741917f914e5a5e350f4fb
Author Marc Cornellà <marc.cornella@live.com> Committer GitHub <noreply@github.com> Date 2018-09-26 15:23 UTC
Message 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.
Diff 1 diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
2 index 302de6e6f8ddeafb08914f8b47bb9e5a342e5db6..1ac3fc96b32c96cbe355adebb4b0c43c6d2d59f7 100644
3 --- a/themes/agnoster.zsh-theme
4 +++ b/themes/agnoster.zsh-theme
5 @@ -215,8 +215,8 @@ prompt_virtualenv() {
6 # - am I root
7 # - are there background jobs?
8 prompt_status() {
9 - local symbols
10 - symbols=()
11 + local -a symbols
12 +
13 [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
14 [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
15 [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"