Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[bug] Problem with functions -s (string arg) math function & specific input
- X-seq: zsh-workers 44686
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: [bug] Problem with functions -s (string arg) math function & specific input
- Date: Mon, 19 Aug 2019 03:00:24 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Xv7NSyioWmVztzyT2DQ1dJwS+ohs1nhP664iRiIcQag=; b=bVXrmaOlgP7U12spdP464bS7cCGiyVmZMKTm4si+2RyM4iADODZEm+d1FbkfY3sXJG Lb0oCuLrvRHTySIs4HuCekpFOritTZwvSHFXqOxA59s6LZQI5F0SzRlRRfxO37rFqAm8 orQPEvJGH6+f74tcrymAQ7R8nX/s9UkTI6MWEAneKPHYqpZxkAWs2AE+G11KU9m+Ss/j lmsPC325lh0jSbgtD/OJOIFfXxiRBFZXWzPUpMpaGSDis4+Z+284RZvXxiQ5dPJ3Y/DA 1EfittbFv8oMCC3qGOQPP7lzJ4u0tzeaIrxCf/GePD1f9aKZwtuOPhZxTou7AKqdc/Pn lXdw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello,
the contents of the string argument seems to be evaluated in some way
(while it shouldn't). Reproducing snippet:
mtest() { print ${#1}; }
functions -s -M mtest 1 1 mtest
input=') &>/dev/null'
(( mtest($input) ))
Output:
0
zsh: bad math expression: operand expected at `>/dev/null...'
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author