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

Re: trivial question




On 2022-12-05 18:12, Lawrence Velázquez wrote:
A decent starting point is to assume that unquoted punctuation is
special until you verify otherwise (assuming you don't actually
want the special behavior).  Even then you might as well quote it
to avoid confusing your future self.
Sure, I quote almost everything anyway.

Presumably you've internalized that "*" is a globbing character,
so you wouldn't be confused if this printed a bunch of filenames:

     echo *.txt

I may as well admit it: I didn't know you could do that.  Nuts, I just never  tried it.  One echo's strings.  And true to form:

$ echo no-such-file*

... returns nothing, just like my initial example.


Once you know that "[" is also a globbing character, it should cease
to be confusing.  That said, remembering all the globbing characters
can be a challenge, especially the ones you don't use regularly.

Ok, this opens the door to clarity.  I just need to know when zsh is going to attempt globbing and keep on the watch for that.  * ? [] (but only paired!) what else?  Man!  To think that I'm just learning this now.  It's been an educational day.







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