From: Andrey Borzenkov <arvidjaar@mail.ru>
To: zsh-workers@sunsite.dk
Subject: Strange _values completion on accept-and-menu-complete and menu selection
Date: Sat, 11 Dec 2004 13:11:27 +0300 [thread overview]
Message-ID: <200412111311.27916.arvidjaar@mail.ru> (raw)
For a long time I have the following bindings:
{pts/1}% bindkey -M menuselect
...
"," accept-and-menu-complete
"/" accept-and-infer-next-history
Apparently it does not work any more for _values; I presume it did work once
because _urpmi completion includes _values usage in question.
Consider:
function _foo () {
_values -s , "test completion" 'foo: :(1 2 3)' bar baz
}
compdef _foo foo
now start completion:
{pts/2}% foo bar,
Completing test completion
bar baz foo
^^^ highlighted
so far so good. But if I press ',' now (assuming complete current value and go
on) I get
{pts/2}% foo bar baz,
Completing test completion
bar baz foo
^^^ highlighted
so auto-suffix is removed while it apparently should not to be?
OTOH doing
pts/2}% foo bar,
Completing test completion
bar baz foo
^^^ highlighted
now press "b" TAB gives you (as expected)
pts/2}% foo bar,baz,
Completing test completion
bar baz foo
Even more interesting with subvalue:
{pts/2}% foo foo=
Completing test completion
bar baz foo
press '/'
{pts/2}% foo foo=1,
1 2 3
OK so ENTER (to accept it) TAB you get
{pts/2}% foo foo=1,bar,
Completing test completion
bar baz
and pressing ',' now results in
{pts/2}% foo foo=1,bar foo=1,baz,
Completing test completion
bar baz
so something strange goes on when menu selection is used.
non default settings:
bindkey -e
bindkey '^I' complete-word
bindkey '^[q' push-line-or-edit
bindkey -M menuselect , accept-and-menu-complete
bindkey -M menuselect / accept-and-infer-next-history
setopt autopushd
setopt cdablevars
setopt extendedhistory
setopt extendedglob
setopt histexpiredupsfirst
setopt histignorealldups
setopt histignoredups
setopt histreduceblanks
setopt histsavenodups
setopt ignoreeof
setopt menucomplete
setopt nobanghist
setopt nolistambiguous
setopt nolistbeep
setopt pushdminus
# The following lines were added by compinstall
autoload -U compinit
compinit
zstyle ':completion:*' auto-description ''''specify: %d''''
zstyle ':completion:*' completer _oldlist _complete _match
zstyle ':completion:*' format ''''Completing %d''''
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the
character
to insert%s'
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-z}={A-Z} r:|
[._-]=*
* r:|=**'
zstyle ':completion:*' match-original both
zstyle ':completion:*' menu select=0
zstyle ':completion:*' verbose true
zstyle :compinstall filename '/home/bor/.zshrc'
# End of lines added by compinstall
zstyle ':completion:*' list-rows-first true
zstyle ':completion:*:paths' accept-exact true
regards
-andrey
next reply other threads:[~2004-12-11 10:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-11 10:11 Andrey Borzenkov [this message]
2004-12-11 21:05 ` Bart Schaefer
2004-12-12 16:15 ` Andrey Borzenkov
2004-12-12 17:51 ` Bart Schaefer
2004-12-12 21:06 ` Andrey Borzenkov
2004-12-12 21:44 ` Bart Schaefer
2004-12-13 10:43 ` Peter Stephenson
2004-12-25 17:32 ` Andrey Borzenkov
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=200412111311.27916.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=zsh-workers@sunsite.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).