zsh-workers
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@spiers.net>
To: zsh workers mailing list <zsh-workers@sunsite.auc.dk>
Subject: feature request: special completion of glob patterns
Date: Tue, 8 Aug 2000 17:25:53 +0100	[thread overview]
Message-ID: <20000808172553.A26023@thelonious.new.ox.ac.uk> (raw)

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?


             reply	other threads:[~2000-08-08 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-08 16:25 Adam Spiers [this message]
2000-08-08 20:41 ` Bart Schaefer
2000-08-09  8:00 Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000808172553.A26023@thelonious.new.ox.ac.uk \
    --to=adam@spiers.net \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).