From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1633 invoked from network); 31 Jan 2005 18:17:21 -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 18:17:21 -0000 Received: (qmail 61207 invoked from network); 31 Jan 2005 18:17:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Jan 2005 18:17:10 -0000 Received: (qmail 11325 invoked by alias); 31 Jan 2005 18:16:55 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8444 Received: (qmail 11311 invoked from network); 31 Jan 2005 18:16:54 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Jan 2005 18:16:54 -0000 Received: (qmail 59846 invoked from network); 31 Jan 2005 18:16:18 -0000 Received: from hydrogen.ucsc.edu (128.114.41.29) by a.mx.sunsite.dk with SMTP; 31 Jan 2005 18:16:14 -0000 Received: from [128.114.139.204] (xanana.ucsc.edu [128.114.139.204]) by hydrogen.ucsc.edu (8.12.11/8.12.11) with ESMTP id j0VIBoM7017775; Mon, 31 Jan 2005 10:11:50 -0800 (PST) In-Reply-To: <1ba5918552xff.dlg@thorstenkampe.de> References: <5ced8dfb84fe26e20350095da48dd44d@chemistry.ucsc.edu> <1ba5918552xff.dlg@thorstenkampe.de> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6f5f1b5c88ce1d0196392e62bcf981f1@chemistry.ucsc.edu> Content-Transfer-Encoding: 7bit Cc: zsh-users@sunsite.dk From: William Scott Subject: Re: odd recursion Date: Mon, 31 Jan 2005 10:16:13 -0800 To: Thorsten Kampe X-Mailer: Apple Mail (2.619.2) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 > > 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.