Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Weird behavior of conditionals with exclamations (ZSH 5.0.7)
- X-seq: zsh-workers 35468
- From: Daniel Miranda <danielkza2@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Weird behavior of conditionals with exclamations (ZSH 5.0.7)
- Date: Sun, 14 Jun 2015 19:50:10 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=yswHUNOwvIqnRJ3talJGUk/Dn3/0NWQbmkHWjbNAfAw=; b=e/wi2eAdnbR0jVWnWvXOq+oafFYMRu85IYujiqVorJdNbTrlsCLzN9qQZsQ/n7drFI 9pD7glhX696O2aWvn1q980lp9W6ri7L7vcTtLi85KOQggof1vvB1slFDlbUwsLcQvyMD Jy6B9+vB8H4HdfHnDy1d5QU3YRHWN/etgqZ4Kc/TRaF3jkcqdcFSu+0kHv5ivPfdnZlI EBIYhHk4Z9xvLRjbphPSK6qPmDEQHG7+sh7pwq8d8tzLjsnLYiVRlgeKpA8wf9nux1HM VGrQzxGVmpPXk5KbtIn3IOrbW/cyq15gSEXRQHrk6BZ8Bh3RDmj0t9irIihDjBOm86Y4 psfA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I've recently encountered a bug in Fedora 22 where I get error
messages when browsing a folder that contains exclamation signs in
it's name in GNOME Terminal with ZSH.
I tracked it down to a profile.d script shipped by the VTE terminal
emulation library. The __vte_urlencode function triggers a "too many
arguments" error in the case I mentioned. You can see the code at the
GNOME miirror in Github [1].
The error happens at line 31:
while [ -n "$str" ]; do
If and only if the value of "$str" is '!', a string containing a
single exclamation. It seems the test command somehow attempts to
parse it as a modifier, instead of an actual string to be tested. The
same *does not* happen in Bash. It seems incorrect, or at least
strange, to me.
Somehow using [[ ]] works correctly. I don't know why that is the case.
Is that expected or have I ran into an issue?
Thanks,
Daniel
[1] https://github.com/GNOME/vte/blob/master/src/vte.sh#L26
Messages sorted by:
Reverse Date,
Date,
Thread,
Author