1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-22 04:11:58 +00:00

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.
This commit is contained in:
Marc Cornellà 2018-09-26 17:23:31 +02:00 committed by GitHub
commit e107b85e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}%}⚙"