zsh-users
 help / color / mirror / code / Atom feed
From: "E. Jay Berkenbilt" <ejb@ql.org>
To: zsh-users@sunsite.auc.dk
Subject: completion with globbing, take 2
Date: Sun, 17 Sep 2000 13:50:32 -0400	[thread overview]
Message-ID: <200009171750.NAA05647@soup.ql.org> (raw)


Several days ago, I wanted to know how I could get zsh to respond to 

something *TAB

by replacing the * with the list everything that the completion system
would return instead of everything * would match in the current
directory.  I was told to do this:

zstyle ':completion:*' completer _oldlist _complete _match
bindkey "^I" complete-word

I've spent a lot of time trying to figure this out, but this still
doesn't work and I don't know how to make it work.  This gives a
behavior like menu-complete.  I never want menu-complete-like
functionality.  I want behavior more like what expand-or-complete does
except that I want only what the completion system would return to be
substituted.

I will be very explicit to reduce the chance of my question being
misunderstood.

zsh -f

> zsh% autoload -U compinit
> zsh% compinit
> zsh% mkdir /tmp/z
> zsh% cd /tmp/z
> zsh% mkdir 1 2 3
> zsh% touch a b c

Type:

> zsh% rmdir TAB

You see:

> zsh% rmdir 
> 1/  2/  3/

Type:

> zsh% rmdir *TAB

You see:

> zsh% rmdir 1 2 3 a b c 

Now configure as above:

> zsh% zstyle ':completion:*' completer _oldlist _complete _match
> zsh% bindkey "^I" complete-word

Type:

> zsh% rmdir *TAB

You see:

> zsh% rmdir 1/
1/  2/  3/

Each subsequent TAB rotates between 1/, 2/, and 3/.

What I want:

> zsh% rmdir *TAB

should yield

> zsh% rmdir 1 2 3 

Is there a way to do this?

--
E. Jay Berkenbilt (ejb@ql.org)  |  http://www.ql.org/q/


             reply	other threads:[~2000-09-17 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-17 17:50 E. Jay Berkenbilt [this message]
2000-09-17 18:43 ` Bart Schaefer
2000-09-17 23:03   ` E. Jay Berkenbilt
2000-09-18  0:17     ` completion and globbing, part 2 E. Jay Berkenbilt
2000-09-18  6:53       ` Andrej Borsenkow
2000-09-18  9:59         ` insert-all-matches example " Andrej Borsenkow
2000-09-18 17:28           ` completion with globbing, take 2 Bart Schaefer
2000-09-18 18:08             ` Andrej Borsenkow
2000-09-19  2:02               ` Bart Schaefer
2000-09-20 15:06                 ` Andrej Borsenkow
2000-09-20 16:12                   ` Bart Schaefer
2000-09-18 22:07             ` E. Jay Berkenbilt
2000-09-19  2:14               ` Bart Schaefer
2001-02-20  9:55                 ` Job Table Nick Cross
2000-09-18  6:07   ` completion with globbing, take 2 Andrej Borsenkow
2000-10-04 11:14 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=200009171750.NAA05647@soup.ql.org \
    --to=ejb@ql.org \
    --cc=zsh-users@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).