Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: expansion
- X-seq: zsh-workers 11804
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: expansion
- Date: Wed, 7 Jun 2000 15:21:09 -0700 (PDT)
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <200006070646.IAA11684@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
On Wed, 7 Jun 2000, Sven Wischnowsky wrote:
> I wrote:
> > 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.
>
> We are talking about *expansion* here.
Yes, I was switching topics a bit and talking about a bug in the
_expand module. When I type the string "ls ~/.z<tab>" hoping to
complete the filename, instead the _expand module expands the ~ into
my home directory, and it now adds a space to the end of the string.
That means I have to backspace over the space to continue completing
the filename.
> Wayne Davison wrote:
> > However, no matter what I try, tab does not expand wildcards with
> > expand-or-complete set.
>
> [Scratching head...] Hm. It works for me.
...And it would have worked for me too if glob_complete hadn't been
turned on in the /etc/zshrc file. I apparently didn't notice that
Mandrake Linux does this (because I have been attempting to use the
new expansion/completion system on my Linux box).
> [Going back to the glob discussion...]
> You can also try the substs-globs-only style.
I assume that should be spelled "subst-globs-only". I can't get this
style to work for me. If I only set subst-globs-only (without anything
like "glob" set), it does nothing. If I also set "glob", it expands
tildes. I.e.:
% zsh -f
% bindkey '\t' complete-word
% autoload -U compinit
% compinit -D
% zstyle ':completion:*' completer _expand _complete
% zstyle ':completion:*:expand:::' subst-globs-only 1
% zstyle ':completion:*:expand:*' tag-order all-expansions
% touch tmp{1..3}
% ls tmp*<tab>
This fails to do anything (but beep). If I add this line:
% zstyle ':completion:*:expand:::' glob 1
then "ls tmp*<tab>" expands correctly, but "~/.z<tab>" expands the
tilde instead of doing nothing.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author