From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22441 invoked from network); 19 Apr 2004 17:21:39 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Apr 2004 17:21:39 -0000 Received: (qmail 16437 invoked by alias); 19 Apr 2004 17:21:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19795 Received: (qmail 16424 invoked from network); 19 Apr 2004 17:21:28 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Apr 2004 17:21:28 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Apr 2004 17:21:28 -0000 Received: (qmail 2545 invoked from network); 19 Apr 2004 17:21:27 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 19 Apr 2004 17:21:25 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-12.tower-36.messagelabs.com!1082395256!5548444 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 9603 invoked from network); 19 Apr 2004 17:20:56 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-12.tower-36.messagelabs.com with SMTP; 19 Apr 2004 17:20:56 -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 i3JHKtMO007874; Mon, 19 Apr 2004 18:20:56 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 88F9C791B8FA; Mon, 19 Apr 2004 19:20:11 +0200 (CEST) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <040419092341.ZM10180@candle.brasslantern.com> From: Oliver Kiddle References: <20040419095235.GA1285@kopfermann.org> <040419092341.ZM10180@candle.brasslantern.com> To: zsh-workers@sunsite.dk Cc: Matthias Kopfermann Subject: Re: menuselect and history Date: Mon, 19 Apr 2004 19:20:11 +0200 Message-ID: <7855.1082395211@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 [redirected to -workers] Bart wrote: > On Apr 19, 11:52am, Matthias Kopfermann wrote: > > > > i just wondered whether it wouldn't be very cool if menuselect was > > useable with historylines. > > --- 8< --- snip --- 8< --- > #compdef -k menu-select ^X: Very nice. > emulate -L zsh > zmodload -i zsh/parameter || return 1 I would tend to be inclined to use _generic to avoid needing such setup code. Also makes it a lot more configurable. Trouble is, that you need to manually define: zle -C history-lines menu-complete _generic zstyle ':completion:history-lines::::' completer _history_lines bindkey '^X:' history-lines I wonder if we should make #compdef -k, make widgets go through _generic somehow. It isn't ideal that with #compdef -k, the function is effectively operating outside of compsys, using raw compwid. Oliver