From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8076 invoked from network); 25 Jul 2005 19:37:30 -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:37:30 -0000 Received: (qmail 99016 invoked from network); 25 Jul 2005 19:37:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 19:37:25 -0000 Received: (qmail 10634 invoked by alias); 25 Jul 2005 19:37:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9175 Received: (qmail 10624 invoked from network); 25 Jul 2005 19:37:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Jul 2005 19:37:18 -0000 Received: (qmail 97892 invoked from network); 25 Jul 2005 19:37:18 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 19:37:13 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Dx8jr-0005mf-6U for zsh-users@sunsite.dk; Mon, 25 Jul 2005 21:35:47 +0200 Received: from 241.119-84-212.ippool.ndo.com ([212.84.119.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jul 2005 21:35:47 +0200 Received: from david by 241.119-84-212.ippool.ndo.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jul 2005 21:35:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: zzapper Subject: Re: default pipe Date: Mon, 25 Jul 2005 20:35:20 +0100 Message-ID: References: <20050725145737.GA903@os> <20050725192330.GB30341@blorf.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 241.119-84-212.ippool.ndo.com X-Newsreader: Forte Free Agent 2.0/32.652 Sender: news X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Mon, 25 Jul 2005 12:23:30 -0700, wrote: >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, never thought to use a sequence ,x etc good idea. I have a convention to use uppercase for Global Aliases don't know if that's my idea or is general. -- zzapper vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?" http://www.rayninfo.co.uk/tips/ vim, zsh & success tips