Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with complete-all
- X-seq: zsh-users 7859
- From: Jesper Holmberg <jeho5791@xxxxxxxxxxxxx>
- To: Zsh-users List <zsh-users@xxxxxxxxxx>
- Subject: Re: Problem with complete-all
- Date: Mon, 16 Aug 2004 08:46:10 +0200
- In-reply-to: <14903.1092389588@xxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Zsh-users List <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040813074526.GM1191@localhost> <14903.1092389588@xxxxxxxxxxxxxxxxxxxxx>
- Sender: Jesper Holmberg <jesper.holmberg.5791@xxxxxxxxxxxxx>
* On Fri Aug 13, Oliver Kiddle wrote:
> It seems we need to fix the example in the manual.
>
> > zle -C all-matches complete-word _generic
> > bindkey '^Xx' all-matches
> > zstyle ':completion:all-matches:*' old-matches only
> > zstyle ':completion:all-matches::::' completer _all_matches
>
> Try changing the last style to add _complete after _all_matches:
> zstyle ':completion:all-matches::::' completer _all_matches _complete
> It needs _complete there to actually generate some matches.
Thank you for your reply, Oliver. It still doesn't work exactly as I'd
expect, though.
This is what I now have in my .zshrc:
zle -C all-matches complete-word _generic
bindkey '^Xx' all-matches
zstyle ':completion:all-matches:*' old-matches only
zstyle ':completion:all-matches::::' completer _all_matches _complete
zstyle ':completion:all-matches:*' insert true
zstyle ':completion:all-matches:*' file-patterns \
'%p:globbed-files' '*(-/):directories' '*:all-files'
Now, if I for example have added the files "file" and "text", I have to
press '^Xx' twice before the added files are inserted after 'cvs add '.
Pressing it once doesn't have any effect.
If I have added the files "file1" and "file2", pressing '^Xx' once gives
me "file" on the command line, i.e. it completes the unique part, just
like complete-word usually does. Pressing '^Xx' another time gives me both
file-names.
How can I change this so that '^Xx' inserts all the files the first time
it is used?
Jesper
Messages sorted by:
Reverse Date,
Date,
Thread,
Author