From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10195 invoked from network); 25 Jul 2005 19:23:50 -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 19:23:50 -0000 Received: (qmail 84675 invoked from network); 25 Jul 2005 19:23:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 19:23:44 -0000 Received: (qmail 6301 invoked by alias); 25 Jul 2005 19:23:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9173 Received: (qmail 6292 invoked from network); 25 Jul 2005 19:23:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Jul 2005 19:23:38 -0000 Received: (qmail 83567 invoked from network); 25 Jul 2005 19:23:38 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 19:23:32 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id CF47065EA; Mon, 25 Jul 2005 12:23:30 -0700 (PDT) Date: Mon, 25 Jul 2005 12:23:30 -0700 From: Wayne Davison To: zzapper Cc: zsh-users@sunsite.dk Subject: Re: default pipe Message-ID: <20050725192330.GB30341@blorf.net> References: <20050725145737.GA903@os> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i 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.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Mon, Jul 25, 2005 at 06:29:41PM +0100, zzapper wrote: > alias -g L=' | less' I too have some global aliases for simple pipe commands, but I have found it a little safer to use a short string of characters that is more unlikely to ever be a filename than a single capital letter. I have these that use a leading comma: alias -g ,e='|egrep' ,f='|fgrep' ,g='|grep' alias -g ,h='|head' ,t='|tail' ,w='|wc' alias -g ,l='|less' ,x='|xargs' I also have a second version of each of those aliases that combines stderr and stdout into the pipe, such as this one for less: alias -g ,,l='|&less' Yes, it does mean you need to type a space before the global alias, but I always typed a space before a "|" anyway, so that doesn't bother me. ..wayne..