Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Weird behavior of conditionals with exclamations (ZSH 5.0.7)



On Jun 14,  7:50pm, Daniel Miranda wrote:
}
} 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.

This has already been fixed in 5.0.8.  I don't know exactly which change
covered it, but:

schaefer[825] zsh-5.0.7 -f
torch% str='!'
torch% while [ -n "$str" ]; do
while> break
while> done
[: too many arguments
torch% 

schaefer[826] zsh-5.0.8 -f
torch% str='!'
torch% while [ -n "$str" ]; do
while> break
while> done
torch% 



Messages sorted by: Reverse Date, Date, Thread, Author