1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-23 09:13:58 +08:00

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.
This commit is contained in:
Carlo Dapor 2018-09-25 21:46:27 +02:00
parent 627393eada
commit afa8dc46ec

View File

@ -212,8 +212,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}%}⚙"