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

confusing passage in zshexpn(1)



Hi list,

Someone on IRC wondered about a problem with the following passage in
zshexpn(1):

[snip]
 x##    (Requires EXTENDED_GLOB to be set.) Matches one or more occur-
        rences of the pattern x. This operator has high precedence;
        '12##' is equivalent to '1(2##)', rather than '(12)##'. No
        more than two active '#' characters may appear together.
[snap]

Because of this part of the manual he tried this:
% setopt EXTENDED_GLOB; touch 12222; echo 1(2##)
zsh: unknown file attribute

That's because of the trailing parentheses in the globbing pattern.
But the manual suggests that this should work.

How could this be included in the manual?
How could the fact be included, that this pattern is okay to use in
the following position?

[snip]
% file=12222
% [[ ${file} == 1(2##) ]] && print match.
match.
[snap]

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



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