From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18877 invoked from network); 25 Jul 2005 17:28:35 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Jul 2005 17:28:35 -0000 Received: (qmail 94031 invoked from network); 25 Jul 2005 17:28:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 17:28:28 -0000 Received: (qmail 12640 invoked by alias); 25 Jul 2005 17:28:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9163 Received: (qmail 12631 invoked from network); 25 Jul 2005 17:28:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Jul 2005 17:28:21 -0000 Received: (qmail 92908 invoked from network); 25 Jul 2005 17:28:21 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 17:28:17 -0000 Received: from candle.brasslantern.com ([71.116.88.149]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IK7004IF1V3LG09@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Mon, 25 Jul 2005 12:28:16 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j6PHSERq028173 for ; Mon, 25 Jul 2005 10:28:14 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j6PHSETU028172 for zsh-users@sunsite.dk; Mon, 25 Jul 2005 10:28:14 -0700 Date: Mon, 25 Jul 2005 17:28:14 +0000 From: Bart Schaefer Subject: Re: default pipe In-reply-to: <20050725145737.GA903@os> To: zsh-users@sunsite.dk Message-id: <1050725172814.ZM28171@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050725145737.GA903@os> Comments: In reply to GoTaR "default pipe" (Jul 25, 4:57pm) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Jul 25, 4:57pm, GoTaR wrote: } } Is it possible somehow to set default pipe command? Well, it's possible *somehow* but ... } $ ls | This is syntactically incomplete, so zsh is going to print the PS2 prompt and wait for you to enter another command. In most cases I think this is what you'd want. The only way to subvert this is to hack the accept-line ZLE widget: function accept-pipe-as-terminator { setopt localoptions extendedglob if [[ "$BUFFER" = *\|[[:space:]]# ]] then # in 4.2.x and later, use BUFFER+=less BUFFER="$BUFFER less" fi zle .accept-line } zle -N accept-line accept-pipe-as-terminator