-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hrvoje Niksic wrote: > Micah Cowan <[EMAIL PROTECTED]> writes: > >>> I don't know. The reason directories are matched separately from >>> files is because files often *don't* match the pattern you've chosen >>> for directories. For example, -X/etc should exclude anything under >>> /etc, such as /etc/passwd, but also /etc/foo/bar/baz. Since '*' in >>> shell-like globs doesn't match '/', it is impossible to write a glob >>> expression to match all files arbitrarily deep under a directory. >> Perhaps a "**" wildcard, that matches /, would be useful; then we could >> combine the meanings of -X and -R (and, -I and -A). > > That sounds pretty neat. I wonder if it would be compatible with > zsh's **, which matches any number of subdirectories. (For example, > zsh's **/*.c is roughly equivalent to `find . -name "*.c"` in other > shells.)
Probably. I was thinking of vim when I wrote it, which has such an operator for its fileglobs; :vimgrep /a particular token/ ./**.c is a fairly useful operation sometimes; and I know I saw it somewhere else, but I'm not sure it's zsh. - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGn6ck7M8hyUobTrERCHEMAJ0QK7VLlWzWbri6OlIZNFdFRmSYQgCdFsZt zv+F6z8Kw14HxrRd4ljCySk= =XeG3 -----END PGP SIGNATURE-----
