Bug 1232443 - String length conditionals broken if value is "!"
Summary: String length conditionals broken if value is "!"
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: 22
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-16 18:49 UTC by Daniel Miranda
Modified: 2015-06-30 00:08 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-06-30 00:01:45 UTC


Attachments (Terms of Use)

Description Daniel Miranda 2015-06-16 18:49:01 UTC
# Description of problem:

The test command in ZSH 5.0.7 seems to be broken for some input values, in particular, '!' (a string containing only an exclamation mark). It causes a "too many arguments" error, instead of handling whatever content it is passed properly.

# Version-Release number of selected component (if applicable):

zsh 5.0.7-8.fc22

# How reproducible:

Always

# Steps to Reproduce:

In ZSH, run

 [ -n '!' ]

# Actual results:

Non-zero return code, and following printed in stderr:

[: too many arguments

# Expected results:

Zero return code and no output.

# Additional info:

The issue has been confirmed to me in the ZSH mailing list [1], and seems to have been fixed in version 5.0.8. The commit containing the fix was given out as well, so a backport should be possible (and greatly appreciated) if an update to 5.0.8 cannot be considered in the near future.

[1] http://www.zsh.org/mla/workers/2015/msg01392.html

Comment 1 Kamil Dudka 2015-06-16 19:12:38 UTC
Thank you for reporting the bug!  I believe it is safe to update zsh to 5.0.8 in stable Fedora.  That version of zsh has been in rawhide for two weeks without any regressions reported so far.

Comment 2 Fedora Update System 2015-06-16 19:38:33 UTC
zsh-5.0.8-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/zsh-5.0.8-1.fc21

Comment 3 Fedora Update System 2015-06-16 19:38:39 UTC
zsh-5.0.8-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/zsh-5.0.8-1.fc22

Comment 4 Daniel Miranda 2015-06-16 19:59:21 UTC
Great! Thanks a lot for the quick response. I'll install the updated packages and test them out ASAP.

Comment 5 Fedora Update System 2015-06-21 00:05:25 UTC
Package zsh-5.0.8-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing zsh-5.0.8-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10157/zsh-5.0.8-1.fc22
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2015-06-30 00:01:45 UTC
zsh-5.0.8-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-06-30 00:08:41 UTC
zsh-5.0.8-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.