zsh-workers
 help / color / mirror / code / Atom feed
* Strange _values completion on accept-and-menu-complete and menu selection
@ 2004-12-11 10:11 Andrey Borzenkov
  2004-12-11 21:05 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Borzenkov @ 2004-12-11 10:11 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-12-25 17:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-11 10:11 Strange _values completion on accept-and-menu-complete and menu selection Andrey Borzenkov
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

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).