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

Re: strange glob expansion



On Sep 3,  2:11pm, Hubert Canon wrote:
} Subject: Re: strange glob expansion
}
} I don't like setopt cshnullglob because it gives strange behaviour
} when I use a single globbing pattern which fails. Like :
} 
} grep foo*bar | less
} 
} If foo*bar matches nothing, it's exactly like : grep | less
} which stops, waiting for input.

No, that's not true.  There are two options: NULL_GLOB behaves as you just
described.  CSH_NULL_GLOB will return "no match" in that instance and not
start the grep; it removes patterns silently only when there is more than
one pattern and at least one pattern matches a file.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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