Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _expand doesn't do brace expansion?
- X-seq: zsh-workers 11930
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: _expand doesn't do brace expansion?
- Date: Thu, 15 Jun 2000 15:08:29 +0000
- In-reply-to: <200006151045.MAA06788@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- In-reply-to: <200006151058.MAA06585@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200006151045.MAA06788@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <200006151058.MAA06585@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Let me preface this by saying: Don't feel obligated to do anything about
this at all; I'm just trying to make helpful suggestions.
On Jun 15, 12:45pm, Sven Wischnowsky wrote:
} Subject: Re: _expand doesn't do brace expansion?
}
} Bart Schaefer wrote:
}
} > _complete manages to complete inside braces; why does the code that
} > understands braces stop taking them apart when there's a closed pair?
}
} With `a{b,c}<TAB>' the completion code would have to generate the
} matches for `ab' and `ac', then built the intersection to get the
} suffixes (and prefixes if there's a suffix, i.e. the middle-strings)
} which are in both sets (in all n sets, actually).
Forget the intersection; complete the union. With braces, it doesn't
matter if some of the results e.g. don't exist as files.
Usually I'm typing something like
ln -s /usr{/local,}bin/blahblahblah
and what I want is to complete along *either* path, not along *both*,
because the thing I'm trying to complete only exists in one of them.
} And that mey be
} combined with arbitrarily complicated match specs. Frightening.
There at least I think you'd be justified to consider anything inside a
closed pair of braces in the prefix to be ineligible for comparison to
match specs -- essentially, ineligible for anything that would insert
characters anywhere other than at the cursor.
} About the other thing, a careful `eval exp=(...)' could do the job
} (avoiding error messages and such).
Quite probably.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author