From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8849 invoked from network); 11 Dec 2004 10:12:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Dec 2004 10:12:41 -0000 Received: (qmail 19300 invoked from network); 11 Dec 2004 10:12:35 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Dec 2004 10:12:35 -0000 Received: (qmail 26323 invoked by alias); 11 Dec 2004 10:12:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20618 Received: (qmail 26308 invoked from network); 11 Dec 2004 10:12:31 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Dec 2004 10:12:31 -0000 Received: (qmail 18752 invoked from network); 11 Dec 2004 10:11:31 -0000 Received: from mx1.mail.ru (194.67.23.121) by a.mx.sunsite.dk with SMTP; 11 Dec 2004 10:11:30 -0000 Received: from [83.237.13.210] (port=32821 helo=ppp83-237-13-210.pppoe.mtu-net.ru) by mx1.mail.ru with asmtp id 1Cd4Dp-0009P7-00 for zsh-workers@sunsite.dk; Sat, 11 Dec 2004 13:11:29 +0300 From: Andrey Borzenkov 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 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412111311.27916.arvidjaar@mail.ru> X-Spam: Not detected X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 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