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

Strange bug with or without quotes



Hi,

actually I stumbled across the following bug:

Assume:
local -a pcomps=('bzip2' 'lzip')

Now try to keep matching parts:
echo "${(M)pcomps:#bzip2}" # -> ""
echo ${(M)pcomps:#bzip2}   # -> "bzip2"

For my understanding, there should be no differences between the quoted
and the unquoted version.

As I had exactly that in some checks, they was always false:
if [[ -z "${(M)pcomps:#$i}" ]]

By the way, I use zsh 5.9.

Any thoughts about that?

Regards
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <Klaus@xxxxxxxxx>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

Attachment: signature.asc
Description: PGP signature



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