delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/10/19/03:30:05

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Trace-PostClient-IP: 68.147.131.211
From: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT Invalid>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: latest ls.exe version in XP problem
Organization: Systematic Software
Message-ID: <r3g9n017icjnf27q81tec1ns6vkbk15ikt@4ax.com>
References: <6jKbd.13476$nj DOT 4016 AT newssvr13 DOT news DOT prodigy DOT com> <416fec3d AT news DOT upm DOT es> <EsSbd.30793$QJ3 DOT 6857 AT newssvr21 DOT news DOT prodigy DOT com> <01c4b377$Blat.v2.2.2$bd9427e0 AT zahav DOT net DOT il> <pSgcd.31525$QJ3 DOT 30700 AT newssvr21 DOT news DOT prodigy DOT com> <01c4b404$Blat.v2.2.2$848b3140 AT zahav DOT net DOT il> <qrKcd.15033$nj DOT 7239 AT newssvr13 DOT news DOT prodigy DOT com> <4174502D DOT 2B5BFD61 AT att DOT net>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Lines: 29
Date: Tue, 19 Oct 2004 07:24:57 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse AT shaw DOT ca
X-Trace: pd7tw2no 1098170697 24.71.223.147 (Tue, 19 Oct 2004 01:24:57 MDT)
NNTP-Posting-Date: Tue, 19 Oct 2004 01:24:57 MDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Mon, 18 Oct 2004 23:21:43 GMT in comp.os.msdos.djgpp, roy robertson
<pamola AT att DOT net> wrote:

>"one2001boy AT yahoo DOT com" wrote:
>
>> I created an alias for "ls" alias to "ls -F"
>
>Don't you get some kind of recursion nightmare if you do that?
>Try it with lss aliassed to ls -F, or maybe there's an environmental variable you can set?

From 'man bash':
                      "The first word of the replacement text  is
       tested  for  aliases,  but  a word that is identical to an
       alias being expanded is not expanded a second time.   This
       means  that  one  may alias ls to ls -F, for instance, and
       bash does not try to recursively  expand  the  replacement
       text.   If  the  last  character  of  the alias value is a
       blank, then the next command word following the  alias  is
       also checked for alias expansion."

The last feature is useful for aliases of commands which typically
take other commands as arguments, like time and xargs, allowing
aliases of other commands to be used. 

-- 
Thanks. Take care, Brian Inglis 	Calgary, Alberta, Canada

Brian DOT Inglis AT CSi DOT com 	(Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
    fake address		use address above to reply

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019