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

Re: Filename Generation - *(.)



On Fri, 5 Oct 2007, Stephane Chazelas wrote:

Would you have a file whose name starts with "-" in the current directory and a GNU grep by any chance?

In any case, when passing /unknown/ arguments (practically, if you can't make sure none of them may start with a - or +), you need to mark the end of options:

grep foo -- *(.)
================

yep, i had a file named "-" in the directory. thanks.


--
        ...atom

 ________________________
 http://atom.smasher.org/
 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
 -------------------------------------------------

	"[Patriotism]... is a word which always
	 commemorates a robbery. There isn't a foot of
	 land in the world which doesn't represent the
	 ousting and re-ousting of a long line of
	 successive 'owners' who each in turn, as
	 'patriots' with proud swelling hearts
	 defended it against the next gang of 'robbers'
	 who came to steal it and did -- and became
	 swelling-hearted patriots in their turn."
		- Mark Twain's Notebook




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