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

Re: Some problems with recursive globbing



On Fri, 8 May 2015 05:37:59 +0200
Jesper Nygårds <jesper.nygards@xxxxxxxxx> wrote:
> I found a solution to my particular problem. I can quote the dir, and then
> remove the quoting of the spaces afterwards.

Yes, or the other approach is quote only the metacharacters (which don't
include space) in the first place.  I think there may be some examples
lying around using ${...//.../...}.  Oh, yes, here's one from _rm:

${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH}

It would be overall simpler not to pass the pattern and a fixed string
around in the same variable, involving a bit of structural change.

pws



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