From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5415 invoked from network); 23 Sep 2004 08:00:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Sep 2004 08:00:50 -0000 Received: (qmail 3469 invoked from network); 23 Sep 2004 08:00:45 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Sep 2004 08:00:45 -0000 Received: (qmail 6510 invoked by alias); 23 Sep 2004 08:00:01 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8014 Received: (qmail 6488 invoked from network); 23 Sep 2004 08:00:00 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Sep 2004 08:00:00 -0000 Received: (qmail 1112 invoked from network); 23 Sep 2004 07:59:03 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 23 Sep 2004 07:59:02 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i8N7x1eg011880 for ; Thu, 23 Sep 2004 00:59:01 -0700 Date: Thu, 23 Sep 2004 00:59:01 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: Zsh Users Subject: Re: most-recent-file completion and accept-line In-Reply-To: <20040922224506.GA18241@fruitcom.com> Message-ID: References: <20040922224506.GA18241@fruitcom.com> 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=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 On Thu, 23 Sep 2004, Eric Smith wrote: > How do I bind a key combination to complete the most recent file > and then automatically run accept-line or on this > filename? This seems like an odd question, because any key _combination_ you choose will be at least as many keystrokes as typing ctrl-o enter. Normally you want bindings for things that would otherwise take lots of keystrokes. However: accept-most-recent() { zle most-recent-file && zle .accept-line } zle -N accept-most-recent bindkey '^X^O' accept-most-recent