From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12156 invoked from network); 22 Aug 2004 21:24:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Aug 2004 21:24:23 -0000 Received: (qmail 86811 invoked from network); 22 Aug 2004 21:24:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Aug 2004 21:24:13 -0000 Received: (qmail 4271 invoked by alias); 22 Aug 2004 21:23:30 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7902 Received: (qmail 4261 invoked from network); 22 Aug 2004 21:23:30 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 22 Aug 2004 21:23:30 -0000 Received: (qmail 85369 invoked from network); 22 Aug 2004 21:21:31 -0000 Received: from vinc17.net1.nerim.net (HELO ay.vinc17.org) (62.4.18.82) by a.mx.sunsite.dk with SMTP; 22 Aug 2004 21:21:29 -0000 Received: from lefevre by ay.vinc17.org with local (Exim 4.34) id 1ByzmI-0004sI-PL; Sun, 22 Aug 2004 23:21:26 +0200 Date: Sun, 22 Aug 2004 23:21:26 +0200 From: Vincent Lefevre To: zsh-users@sunsite.dk Subject: Re: Tip of the day: previous command output Message-ID: <20040822212126.GN7841@ay.vinc17.org> Mail-Followup-To: zsh-users@sunsite.dk References: <20040819085812.GL22962@localhost> <20040819164250.GA21575@spiegl.de> <20040820121202.GA31466@spiegl.de> <20040820145032.GH13530@ay.vinc17.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.6i Sender: Vincent Lefevre X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.9 required=6.0 tests=BAYES_10 autolearn=no version=2.63 X-Spam-Hits: -0.9 On 2004-08-20 21:25:47 -0700, Bart Schaefer wrote: > On Fri, 20 Aug 2004, Vincent Lefevre wrote: > > And would it be possible to get a menu, in order to select one or > > several filenames manually? > > For that we get a little more intense: > > _insert_kept() { > (( $#kept )) || return 1 > local action > zstyle -s :completion:$curcontext insert-kept action > if [[ -n $action ]] > then compstate[insert]=$action > fi > compadd -a kept > } > zle -C insert-kept-result complete-word _generic > zstyle ':completion:insert-kept-result:*' completer _insert_kept > > Now you get Andy's thing with > > zstyle ':completion:*' insert-kept all > > Or you can get menu completion with > > zstyle ':completion:*' insert-kept menu > > and it does menu completion according to whatever your other usual > styles are (or you can add other specific styles for this context). I was talking about another kind of menu (which could be useful for standard completion too). For instance, there could be a cursor for the (standard zsh) menu, or perhaps a number, to be able to choose one or several word candidates. $ echo [TAB] [ab] ef ij cd gh kl [...] represents the cursor around "ab". or $ echo [TAB] 1 ab 3 ef 5 ij 2 cd 4 gh 6 kl then typing some key followed by the number would insert the word. This may be useful when there are many common prefixes (this often occurs in practice). -- Vincent Lefèvre - Web: 100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17, Championnat International des Jeux Mathématiques et Logiques, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA