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

Re: Bug in ${(Q)...}



On Jul 12,  7:38pm, Philippe Troin wrote:
} Subject: Bug in ${(Q)...}
}
} % setopt extended_glob
} % echo $ZSH_VERSION "<${(Q)${$(print hello)/%hello#}}>"
} 4.0.6 < >
} 
} Shouldn't that be:
} 4.0.6 <>
} 
} (no space)

This is indeed a bug.  No process substitution required:

schaefer<501> x=(hello)
schaefer<502> setopt extendedglob
schaefer<503> echo $ZSH_VERSION "<${(Q)${${x}/%hello#}}>"
4.1.1-dev-1 < >

But it's not arrays, either, which I initially thought it was:

schaefer<505> x=hello
schaefer<506> echo $ZSH_VERSION "<${(Q)${${x}/%hello#}}>"
4.1.1-dev-1 < >
schaefer<507> echo $ZSH_VERSION "<${(Q)${x/%hello#}}>" 
4.1.1-dev-1 < >

So I'm not sure if this is really a problem with (Q) in paramsubst(), or
if it's deeper, in parse_subst_string(), and it just happens that (Q)
makes it visible.



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