From: Wayne Davison <wayned@users.sourceforge.net>
To: zsh-users@sunsite.auc.dk
Subject: configuring the new completion system
Date: Tue, 6 Jun 2000 15:22:37 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.21.0006061440350.1718-100000@phong.blorf.net> (raw)
In-Reply-To: <1000606032038.ZM25884@candle.brasslantern.com>
On Tue, 6 Jun 2000, Bart Schaefer wrote:
> As a workaround, the following should behave the way you want:
>
> bindkey '\t' complete-word
> autoload -U compinit
> compinit
> zstyle ':completion:*' completer _expand _complete
> zstyle ':completion:*:expand:::' glob 1
> zstyle ':completion:*:expand:::' substitute 1
This comes close, but there's still something about this setup that
annoys the heck out of me. (I'm only just beginning to try to get the
new completion system working (since I have mainly been using a
customized version of 3.0.7 until just recently), so hopefully this
can be tweaked.)
My biggest gripe is that if I type "~/.z" or "$HOME/.z" and press tab,
the prefix expands into my home directory path. I *hate* this. I'm
typing an abbreviated directory path and I want to complete an
abbreviated directory path. When I remove the "_expand" portion of
the zstyle, then that part of the completion works properly, but I can
no longer expand "~/.z*" into a list of file names. I would love to
see a version of _expand that works like it did in 3.0.x.
On a related note, I've always disliked the fact that wildcard
expansion expands variables and tilde references. For instance, if I
type:
touch ~/.tmp{1..3}
rm ~/.tmp*<tab>
I want to see:
rm ~/.tmp1 ~/.tmp2 ~/.tmp3
not:
rm /home/wayne/.tmp1 /home/wayne/.tmp2 /home/wayne/.tmp3
I've always been meaning to look into fixing this. I figure that the
code can either keep a copy of the unexpanded strings to substitute
into, or that it can do a set of reverse substitutions after the
wildcard expansion has completed (e.g. turning "/home/wayne" back into
a "~" at the tail end of the process).
Finally, one of the just-committed cvs changes has introduced a bug
where an extra space is getting added when it shouldn't be. Now, if
you type "~/.z<tab>" you get "/home/wayne/.z " even though that file
does not exist. You should be able to reproduce this as follows:
% zsh -f
% autoload -U compinit
% compinit
% zstyle ':completion:*' completer _expand _complete
% zstyle ':completion:*:expand:::' glob 1
% ls ~/.z<tab>
..wayne..
next prev parent reply other threads:[~2000-06-06 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-06 1:07 blah*[TAB] (difference between 3.1.6 and 3.1.9) Vincent Lefevre
2000-06-06 3:20 ` Bart Schaefer
2000-06-06 9:22 ` Vincent Lefevre
2000-06-06 22:22 ` Wayne Davison [this message]
2000-06-07 5:26 ` configuring the new completion system Bart Schaefer
2000-06-07 6:03 ` Wayne Davison
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=Pine.LNX.4.21.0006061440350.1718-100000@phong.blorf.net \
--to=wayned@users.sourceforge.net \
--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).