Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Why such math-expression error?



Hi
I've got in a script a code:

(( ${+ice[make]} )) && ...

It causes the following error:

∞zinit-make-hook:9: bad math expression: operand expected at end of string

When I do local -A ice, the error disappears. Printing ${(t)ice} shows
empty string, and unset ice doesn't help.

Why such error? In interactive shell, I can $+ basically any expression I
want in an $((, specifically (( ${+unset_var[string]} )) works fine.

-- 
Sebastian Gniazdowski
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
Blog: http://zdharma.org


Messages sorted by: Reverse Date, Date, Thread, Author