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

Bug in zparseopts -G?



There seems to be a discrepancy in how zparseopts -G handles ~ paths.

--option ~/path and --option=~/path are not equivalent.  In the first the tilde is expanded (probably as part of the shell's parsing before it gets to zparseopts) in the second it isn't.

I don't believe most people would expect this behavior.  I certainly didn't, though I can understand why it happens.

If not fixed, it needs to be documented, as well as a workaround.  I was able to get it working for my needs with a bare ${(q)${~var}}, but I worry about the effect of globbing characters in var in that case.





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