Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
feature request: special completion of glob patterns
- X-seq: zsh-workers 12571
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: feature request: special completion of glob patterns
- Date: Tue, 8 Aug 2000 17:25:53 +0100
- Mail-followup-to: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
This one's a little bit tricky to explain, and I suspect way too
tricky to implement, but I'll mention it anyway.
Say I want to diff two files in mirrored directory hierarchies:
foo1/bar/baz.txt
foo2/bar/baz.txt
Ideally, I would like the following completion behaviour (assuming
baz.txt is the only file in foo1/bar):
$ diff -u foo[12]/bar/b<TAB>
$ diff -u foo[12]/bar/baz.txt
i.e. zsh would do normal expansion on `foo[12]/bar/b', attempt
completion on the first filename generated by the expansion, and then
perform the same change to `foo[12]/bar/b' as it did to `foo1/bar/b'
when it completed it to `foo1/bar/baz.txt', which in this case is
adding `az.txt' to the end.
Similar behaviour for
$ diff -u foo_{one,two}/bar/b<TAB>
would be great too.
Now I realise that to do this in full generality with the myriad of
complex patterns zsh understands may well be impossible, but is it
feasible to deal with simple cases like these?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author