From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Why such math-expression error?
Date: Mon, 6 Jul 2020 08:56:10 +0200 [thread overview]
Message-ID: <CAKc7PVBrzUHYMRHM8g9Y2m4kBemAMT4FUgkESibsZ1F3Q3KDwg@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2020-07-06 6:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 6:56 Sebastian Gniazdowski [this message]
2020-07-06 11:19 ` Sebastian Gniazdowski
2020-07-06 23:48 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKc7PVBrzUHYMRHM8g9Y2m4kBemAMT4FUgkESibsZ1F3Q3KDwg@mail.gmail.com \
--to=sgniazdowski@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).