From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9797 invoked from network); 29 May 2000 12:08:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 May 2000 12:08:10 -0000 Received: (qmail 5157 invoked by alias); 29 May 2000 12:07:19 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3098 Received: (qmail 5145 invoked from network); 29 May 2000 12:07:05 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Andy Spiegl" , "ZSH User List" Subject: RE: strange alias effects Date: Mon, 29 May 2000 16:06:57 +0400 Message-ID: <000401bfc966$62db4e50$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 In-reply-to: <000301bfc963$3615d910$21c9ca95@mow.siemens.ru> > > Well, aliases are not expanded in direct function defiition > (correct me, > Bart). Weirdly enough, they are expanded (by default) in autoloaded > functions. > Sorry, this is of course wrong. You just seem to have alias definition *after* function definition. Because aliases are expanded when function is *defined*, they are not seen when functnio is executed. Autoloading provides neat workaround - function body is first read in after everything else (including aliases) was already defined. For the same reason, second function definition in your example (on command line) works as expected - aliases are already known. -andrej