From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10145 invoked from network); 22 Apr 2004 04:57:40 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 22 Apr 2004 04:57:40 -0000 Received: (qmail 24603 invoked by alias); 22 Apr 2004 04:57:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7387 Received: (qmail 24591 invoked from network); 22 Apr 2004 04:57:22 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 22 Apr 2004 04:57:22 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 22 Apr 2004 4:57:22 -0000 Received: (qmail 23618 invoked from network); 22 Apr 2004 04:57:22 -0000 Received: from wbar3.sjo1-4-11-009-147.sjo1.dsl-verizon.net (HELO candle.brasslantern.com) (4.11.9.147) by a.mx.sunsite.dk with SMTP; 22 Apr 2004 04:57:19 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i3M4vHg15290 for zsh-users@sunsite.dk; Wed, 21 Apr 2004 21:57:17 -0700 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040422045717.ZM15289@candle.brasslantern.com> Date: Thu, 22 Apr 2004 04:57:17 +0000 In-Reply-To: <20040420160802.12160.qmail@web10405.mail.yahoo.com> Comments: In reply to Felix Rosencrantz "Re: menuselect and history" (Apr 20, 9:08am) References: <20040420160802.12160.qmail@web10405.mail.yahoo.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: menuselect and history MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: **** X-Spam-Status: No, hits=4.7 required=6.0 tests=RCVD_IN_DYNABLOCK, RCVD_IN_NJABL,RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 4.7 On Apr 20, 9:08am, Felix Rosencrantz wrote: } } As Matthias predicted, this is cool. It would be even cooler if it } could be connected to the incremental search commands. The list } presented would be winnowed as the user types the search term. This might be possible, but it'd be significantly more difficult. Menu selection just doesn't work that way -- the incremental search commands scan through the listing, they don't narrow it -- so what in effect you'd need to do is exit from and restart completion on every keystroke. However, given the _history_select function that I posted, you can do this: autoload -U incremental-complete-word zle -N incremental-complete-word bindkey '^Xi' incremental-complete-word zstyle :incremental list yes zstyle ':completion:incremental:*' completer _history_select ... (where "..." are whatever completers you normally would want to try) and then when you type C-x i on the command word you should get exactly what you just asked for, except that you _can't_ also scroll around in the list of choices. This does show a bug in incremental-complete-word -- the way that it computes its prompt pre-dates some changes in the conventions for the values of the _lastcomp association. (There are likely to be other outdated things about i-c-w that are problems waiting to happen.)