Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: setopt globcomplete and () broken
- X-seq: zsh-workers 26709
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: setopt globcomplete and () broken
- Date: Tue, 10 Mar 2009 17:34:24 +0000
- In-reply-to: <20090310135146.30c0c794@news01>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <237967ef0903100625s7e8e5908t7852ade0c1d6d8d3@xxxxxxxxxxxxxx> <20090310135146.30c0c794@news01>
On Tue, 10 Mar 2009 13:51:46 +0000
Peter Stephenson <pws@xxxxxxx> wrote:
> elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
> tmp2=( "$tmp2[@]" "${match[1]}((${tmp3}${match[2][3,-1]}" )
I thought I was on the way to understanding what was going on here, but
this attempt to match some form of glob qualifiers has stumped me. Why are
we specially matching a pattern ending with glob qualifiers wrapped in
double parentheses? What we're matching against, $tmp1, comes from patterns
supplied to _files or _path_files as an argument; I can't see any sign the
double parentheses are used, and the expansion manual says
A glob subexpression that would normally be taken as glob qualifiers, for
example (^x), can be forced to be treated as part of the glob pattern by
doubling the parentheses, in this case producing ((^x)).
Yet we are treating it as if it's a glob expression ($tmp3 is the
new glob qualifier we are trying to insinuate into the list).
Can I simply hold my breath until it goes away?
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author