zsh-users
 help / color / mirror / code / Atom feed
From: "E. Jay Berkenbilt" <ejb@ql.org>
To: Andrej.Borsenkow@mow.siemens.ru
Cc: zsh-users@sunsite.auc.dk
Subject: Re: glob completion without menu style completion
Date: Fri, 15 Sep 2000 14:59:01 -0400	[thread overview]
Message-ID: <200009151859.OAA14471@soup.ads.apexinc.com> (raw)
In-Reply-To: <000101c01f3e$cf699350$21c9ca95@mow.siemens.ru> (Andrej.Borsenkow@mow.siemens.ru)


>   > Is there a way to get it so that when I type
>   >
>   > rmdir *TAB
>   >
>   > the * gets replaced with all the choices that the completion system
>   > returns at that time (i.e., whatever glob pattern I've typed should be
>   > applied to the completion choices rather than to files)?  I don't see
>   > an option to do this.
>   >
>   > This would be so great for commands like cvs add and cvs rm.......
>   >
>
>   . . .
>
>   You are better off if you redefine TAB to simple expand-word like
>
>   bindkey '^I' expand-word
>
>   (that is what I have in my .zshrc), and use _match or _expand completers. I
>   personally do not have much experience with _expand, I use _match. Use them as
>   secondary competer; I use
>
>   zstyle ':completion:*' completer _oldlist _complete _match
>
>   and I get exactly what you want. In general, _match will try to match possible
>   completions (in this case, directory names) against pattern on command line.
>   It will be used if _complete did not generate any completions, that is, no
>   directory that started with '*' existed :-)

Thanks.  I'll study this so I understand exactly what it means and
give it a try.

>   In general, it is always good idea to use plain complete-word with new
>   completion system, because then you have much better control over possible
>   interpretation of patterns.

Do you mean to say that it's better to use expand-word, or are you
indicating here that there is some loss of control over interpretation
of patters by switching to expand-word?  If the latter, is it fully
mitigated by giving the zstyle command you mentioned?  I will need to
look into this in more depth so I can understand the full implications
of switching from complete-word to expand-word...

                                Jay


      parent reply	other threads:[~2000-09-15 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-15 17:30 E. Jay Berkenbilt
2000-09-15 18:00 ` Andrej Borsenkow
2000-09-15 18:55   ` Bart Schaefer
2000-09-15 19:52     ` E. Jay Berkenbilt
2000-09-18  7:05     ` Andrej Borsenkow
2000-09-15 18:59   ` E. Jay Berkenbilt [this message]

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=200009151859.OAA14471@soup.ads.apexinc.com \
    --to=ejb@ql.org \
    --cc=Andrej.Borsenkow@mow.siemens.ru \
    --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).