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

Re: PATCH: 3.1.6-pws-2: globbing documentation



On Sep 3,  4:43pm, Peter Stephenson wrote:
} Subject: PATCH: 3.1.6-pws-2: globbing documentation
}
} This clarifies the globbing documentation in ways which should be
} familiar from recent discussions.  Please look at it and say if you
} think that it has the opposite effect.

Well ...

} +Note that grouping cannot extend over multiple directories: it is an error
} +to have a `tt(/)' within a group (this only applies for patterns which
} +match filenames).

I'd change "which match filenames" to "used in filename generation".  If
I do

	for file in /etc/host* ; do ...; done

I tend to think of $file as "a filename" inside the loop body, but I can
still use [[ $file = (*/)# ]] without getting "bad pattern."

Then down here:

} +As a shorthand, `tt(**/)' is equivalent to `tt((*/)#)'; note that this
} +therefore matches files in the current directory as well as
} +subdirectories.

Wait, we just said that (*/)# was not a legal pattern!  How can **/ be a
shorthand for it?  What we really mean (now) is that ** is a _replacement_
(or "alternative" or some such word) for (*/)#, right?

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



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