Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Why such math-expression error?
- X-seq: zsh-users 24981
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Why such math-expression error?
- Date: Mon, 6 Jul 2020 08:56:10 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Sender: zsh-users@xxxxxxx
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