summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2018-09-26 17:23:31 +0200
committerGitHub <noreply@github.com>2018-09-26 17:23:31 +0200
commite107b85e3aedc644a7741917f914e5a5e350f4fb (patch)
tree5eff0fd8713c2662917e3e5bf633bc72c6482738 /themes
parent7f6e6cf346268a6d2cdf6fe167a60827aab53f0b (diff)
parenta3d13eb76a19bbe18b6b843232695645bd9aa632 (diff)
downloadzsh-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-theme4
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}%}⚙"