Afficher un message
Vieux 19/05/2007, 22h13   #3
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: zsh pattern-matching makes no sense...

2007-05-19, 17:39(+00), kj:
[...]
> Also, I can't find anything in the documentation that would explain
> why foo(/*)# is invalid, but foo/(*/)# is OK.

[...]

(...)
Matches the enclosed pattern. This is used for grouping. If the
KSH_GLOB option is set, then a `@', `*', `+', `?' or `!'
immediately preceding the `(' is treated specially, as detailed
below. The option SH_GLOB prevents bare parentheses from being
used in this way, though the KSH_GLOB option is still available.

Note that grouping cannot extend over multiple directories: it is
an error to have a `/' within a group (this only applies for
patterns used in filename generation). There is one exception: a
group of the form (PAT/)# appearing as a complete path segment can
match a sequence of directories. For example, foo/(a*/)#bar
matches foo/bar, foo/any/bar, foo/any/anyother/bar, and so on.


> Is there a more complete and accurate description of the zsh pattern
> syntax than what one can find in the zshall man page? Alternatively,
> is there a way to get more informative error messages from zsh?

[...]

man is not really appropriate for a manual this size, I would
recommand you learn how to use "info" efficiently (look at its
"i" and "g" commands combined with completion), or read the
manual online in HTML with the of some search engine.

--
Stéphane
  Réponse avec citation
 
Page generated in 0,05534 seconds with 9 queries