Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: confusing passage in zshexpn(1)
- X-seq: zsh-users 11081
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: Re: confusing passage in zshexpn(1)
- Date: Tue, 12 Dec 2006 12:42:50 +0100
- In-reply-to: <200612121043.kBCAhuaT005871@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Operating-system: Linux 2.6.18.5suspend2+ipw2200 i686
- References: <20061212002156.GC2399@xxxxxxxxxxxxxxx> <200612121043.kBCAhuaT005871@xxxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx>:
> Frank Terbeck wrote:
[...]
> > That's because of the trailing parentheses in the globbing pattern.
> > But the manual suggests that this should work.
>
> Well, as Bart pointed out, no it doesn't, it's indicating precedence of
> interpretation and nowhere says it's in the form you need to match a
> file under every possible circumstance.
Yes, that's how I understood it as well in the first place. I thought
the way the person on IRC understood it was reasonable as well. But
it's true that people shouldn't see every sentence as potential
real-life examples.
> But it's easy to add a cautionary note.
Okay. But I hope that won't lead people to demand warning notes for
every little piece of documentation that (treated alone) looks like an
example.
[...]
> > [snip]
> > % file=12222
> > % [[ ${file} == 1(2##) ]] && print match.
> > match.
>
> Do you mean you're suggesting this as an alternative example that would
> actually work?
No! :-) I just didn't know how to express what I wanted to say
properly.
> [...] it's cleaner to write this as 12## anyway, without the
> parentheses. That's why you don't fall over the glob qualifier
> problem in practice: you only need the parentheses when there are
> #'s after them.
Yes, that was my reply on IRC as well. I was just confused and didn't
think close enough before posting.
> By the way, if you feel yourself susceptible to problems like this,
> you can set both NO_BARE_GLOB_QUAL and EXTENDED_GLOB and use (#q...) for
> glob qualifiers.
No, I don't. But thank you anyway. :)
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