From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24642 invoked from network); 31 Jan 2005 20:45:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Jan 2005 20:45:25 -0000 Received: (qmail 17187 invoked from network); 31 Jan 2005 20:45:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Jan 2005 20:45:18 -0000 Received: (qmail 11453 invoked by alias); 31 Jan 2005 20:45:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8445 Received: (qmail 11383 invoked from network); 31 Jan 2005 20:45:01 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Jan 2005 20:45:01 -0000 Received: (qmail 15887 invoked from network); 31 Jan 2005 20:44:25 -0000 Received: from 216-19-209-140.getnet.net (HELO mail.cql.com) (216.19.209.140) by a.mx.sunsite.dk with SMTP; 31 Jan 2005 20:44:21 -0000 Received: from [192.168.1.14] ([::ffff:192.168.1.14]) by mail.cql.com with esmtp; Mon, 31 Jan 2005 14:00:01 -0700 Message-ID: <41FE98A3.8040700@cql.com> Date: Mon, 31 Jan 2005 13:44:19 -0700 From: Seth Kurtzberg User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: William Scott CC: Thorsten Kampe , zsh-users@sunsite.dk Subject: Re: odd recursion References: <5ced8dfb84fe26e20350095da48dd44d@chemistry.ucsc.edu> <1ba5918552xff.dlg@thorstenkampe.de> <6f5f1b5c88ce1d0196392e62bcf981f1@chemistry.ucsc.edu> In-Reply-To: <6f5f1b5c88ce1d0196392e62bcf981f1@chemistry.ucsc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 William Scott wrote: >> >> I hope you have your reasons to tell the shell "a is b" and "a is c" >> at the same time. Basically your aliasing ls two times simultaneously. >> >> > > The interesting thing is that if I issue > > "which lf" it tells me that lf is aliased, not that it is defined as > a function. If I then issue the newly defined lf command, the > function takes precedence over the alias (which is what I understood > to be the expected behavior), which I can see from the error messages > produced. > > The problem arose because a user made the alias without checking to > see that the function was defined, and that the function was written > as a posix function and defined after the alias in the sequence of > shell initialization. > > If the alias is defined after the posix function is defined, the > problem doesn't arise. I don't see any way around this, without taking away good and necessary behavior. You can always use the really simple solution, which is not to have a name clash at all. I use a short script I wrote to tell me whether a name is already defined somewhere. It's got a bug in it w.r.t. functions (which makes it useless at the moment) but I'll (presumably) fix that. IMHO, it is always better to keep things explicit rather than relying on the sequence of operations in the implementation. A warning, as someone suggested, might be a better solution. > > > !DSPAM:41fe79f8244781930316049! >