Unverified Commit e107b85e authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub
Browse files

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.
parents 7f6e6cf3 a3d13eb7
...@@ -215,8 +215,8 @@ prompt_virtualenv() { ...@@ -215,8 +215,8 @@ prompt_virtualenv() {
# - am I root # - am I root
# - are there background jobs? # - are there background jobs?
prompt_status() { prompt_status() {
local symbols local -a symbols
symbols=()
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment