zsh-users
 help / color / mirror / code / Atom feed
From: "Jérémie Roquet" <arkanosis@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Completion of paths with filename generation or brace expansion involved
Date: Thu, 26 Jun 2014 16:15:09 +0200	[thread overview]
Message-ID: <CAFOazAN06Adpnxe4Zt7ZdFg4NLcjsZ3om870rVJyWPHWr_rP5w@mail.gmail.com> (raw)

Hi,

Let's consider this filesystem:

/foo/bar/fish
/foo/bar/zoo
/foo/bar/zsh
/foo/baz/zsh

When I type:

$ /foo/ba{r,z}/z<tab>

then thanks to brace expansion, my buffer is replaced with:

$ /foo/bar/z /foo/baz/z

Similarly, when I type:

$ /foo/ba(r|z)/<tab>

then thanks to filename generation, my buffer is replaced with:

$ /foo/bar/ /foo/baz/

Also, if instead of <tab>, I hit <shift>+<tab>, I get a menu which
allows me to choose between possible expansions / generations and the
original expression.

What I would like to know, is if there's a way to have completion at
this point, without modifying the part of the buffer that I've already
typed. In other words, is it possible, when I type:

$ /foo/ba{r,z}/z<somekey>
$ /foo/ba(r|z)/<somekey>

to have my buffer *not* changed, but get suggestions for files that are:
1) either in /foo/bar *or* /foo/baz
2) both in /foo/bar *and* /foo/baz

?

For case 1), I'd expect the buffer to be changed to:

$ /foo/ba{r,z}/z
file
zoo zsh

after non-modifying brace expansion, or

$ /foo/ba(r|z)/
file
fish zoo zsh

after non-modifying filename generation.

For case 2), I'd expect the buffer to be changed to:

$ /foo/ba{r,z}/zsh

after non-modifying brace expansion, or
$ /foo/ba(r|z)/zsh

after non-modifying filename generation.

Any idea?

Thanks in advance!

-- 
Jérémie


                 reply	other threads:[~2014-06-26 14:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAFOazAN06Adpnxe4Zt7ZdFg4NLcjsZ3om870rVJyWPHWr_rP5w@mail.gmail.com \
    --to=arkanosis@gmail.com \
    --cc=zsh-users@zsh.org \
    /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).