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

Re: confusing passage in zshexpn(1)



On Dec 12,  1:21am, Frank Terbeck wrote:
}
} 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.

People are WAY too "suggestible."

Not every fragment that appears as part of a sentence is desgined to be
usable as a literal stand-alone example!  If it were, it would be on a
line by itself, indented, and probaly set off with blank lines before
and after as well, not stuck into a sentence with quote marks around it.
 
} How could this be included in the manual?

As it happens, this fragment DOES work if you setopt NO_BARE_GLOB_QUAL.
That you need to use NO_BARE_GLOB_QUAL to avoid having trailing parens
interpreted as glob qualifiers is documented in several other places.
It's wildly impractical to document every possible interaction of the
dozens of tangentially related options at every example.

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

That's included too, in the sense that glob qualifiers never apply when
you aren't doing file name matching.



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