summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorCarlo Dapor <catull@gmail.com>2018-09-25 21:46:27 +0200
committerCarlo Dapor <catull@gmail.com>2018-09-25 21:46:27 +0200
commitafa8dc46ecb1babda7db8fb8228224e8975e95f4 (patch)
treec23965baebef65f26e9b9ef8e759fcc3961b4327 /themes
parent627393eadaf715adcf8308cd2e6b93413dfae72d (diff)
downloadzsh-afa8dc46ecb1babda7db8fb8228224e8975e95f4.tar.gz
zsh-afa8dc46ecb1babda7db8fb8228224e8975e95f4.tar.bz2
zsh-afa8dc46ecb1babda7db8fb8228224e8975e95f4.zip
Fix agnoster initial diagnostic error
This PR fixes the runtime error that displays this: ```log 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 d1a69c560..18496c2bc 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -212,8 +212,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}%}⚙"