From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8570 invoked from network); 20 Apr 2004 13:20:24 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Apr 2004 13:20:24 -0000 Received: (qmail 26040 invoked by alias); 20 Apr 2004 13:19:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19802 Received: (qmail 26024 invoked from network); 20 Apr 2004 13:19:15 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 20 Apr 2004 13:19:15 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 20 Apr 2004 13:19:15 -0000 Received: (qmail 1471 invoked from network); 20 Apr 2004 13:19:14 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 20 Apr 2004 13:19:12 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-21.tower-36.messagelabs.com!1082467124!5622725 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 542 invoked from network); 20 Apr 2004 13:18:44 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-21.tower-36.messagelabs.com with SMTP; 20 Apr 2004 13:18:44 -0000 Received: from trentino.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i3KDIhMO021833 for ; Tue, 20 Apr 2004 14:18:43 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 50AED791B90A for ; Tue, 20 Apr 2004 15:17:59 +0200 (CEST) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <040419131414.ZM10562@candle.brasslantern.com> From: Oliver Kiddle References: <20040419095235.GA1285@kopfermann.org> <040419092341.ZM10180@candle.brasslantern.com> <7855.1082395211@trentino.logica.co.uk> <040419131414.ZM10562@candle.brasslantern.com> To: zsh-workers@sunsite.dk Subject: Re: menuselect and history Date: Tue, 20 Apr 2004 15:17:59 +0200 Message-ID: <9203.1082467079@trentino.logica.co.uk> 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 Bart wrote: > Does that succeed in forcing menu-selection to always be used? Normal It depends on your menu style just like normal completion. > menu completion can't work here because you're completing multiple words I don't think there's a way round that. It's unfortunate for a number of reasons that completion forces initial splitting on shell words. > That can be solved by having the function redefine itself like so: > > --- 8< --- snip --- 8< --- > #compdef -k menu-select ^X: > zle -C history-select menu-select _generic > zstyle ':completion:history-select::::' completer _history_select The trouble with this is that it is forcing a particular completer style on you. Often it is useful to be able to add other completers like _menu and _match to the list. Though you could contrive a more specific context, I don't really like the idea of defining styles behind people's back like this. The fact that they are defined when the widget is invoked makes this even worse. It makes it very hard if you want to override the settings, perhaps to use different key bindings from the default. I'd prefer to find another way to communicate the default completer to _main_complete. We could keep them in an associative array or could even use _${WIDGET/-/_}. The other problem is knowing when to use the default completer list and when to use the completer style. All too often, zstyle will return the user's default completer. It seems that setting up sensible defaults while maintaining configurability is going to be hard. > Presumably `compdef' could be fixed up to do the equivalent when passed > the correct options. I'd recommend leaving -k as it is and adding a new > option to automatically apply the _generic wrapper. Yes a new option is probably necessary to maintain backward compatibility. Oliver