zsh-users
 help / color / mirror / code / Atom feed
* Why such math-expression error?
@ 2020-07-06  6:56 Sebastian Gniazdowski
  2020-07-06 11:19 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Gniazdowski @ 2020-07-06  6:56 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-06 23:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06  6:56 Why such math-expression error? Sebastian Gniazdowski
2020-07-06 11:19 ` Sebastian Gniazdowski
2020-07-06 23:48   ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).