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

Re: glob expansion



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 28Apr, 2008, at 10:26, Lloyd Zusman wrote:

Lloyd Zusman <ljz@xxxxxxxxxx> writes:

Michael Wild <themiwi@xxxxxxxxx> writes:

[ ... ]

find /usr/lib -type f -name *.so

[ ... ]

So my question: Is there any way to change the expansion behavior of
ZSH? The man-pages and the FAQ didn't help me, nor did google. But
then, I'm quite sure I didn't use the appropriate search terms...

Try this:

 alias find='noglob /usr/bin/find'

Then, issue the command above. This works for specific commands. Also,
look at 'setopt nonomatch' if you want this behavior all the time.

Of course, the 'nonomatch' option doesn't work quite the same way as the 'noglob' prefix. It only suppresses the error and returns the wildcard
if the glob doesn't match -- it expands it if it does.  The 'noglob'
prefix ensures that no glob expansion will be performed in any case.

I shouldn't post here before my morning coffee.

;-) I sure got the difference, and nonoglob exactly does what I want. Expansion if possible, otherwise pass it on without erroring out.


Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkgVi1sACgkQyAe0BK8NufP3RQCfUsgmnnz/r4ivVFx2ZQVgpcIA
jWMAmgKkt1hg31XrirJx6C1getQPXWkQ
=uFzq
-----END PGP SIGNATURE-----



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