From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13529 invoked from network); 3 Jan 2003 15:31:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 3 Jan 2003 15:31:36 -0000 Received: (qmail 26437 invoked by alias); 3 Jan 2003 15:31:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5640 Received: (qmail 26428 invoked from network); 3 Jan 2003 15:31:19 -0000 From: Carlos Carvalho MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <15893.44217.393956.262362@fisica.ufpr.br> Date: Fri, 3 Jan 2003 13:31:05 -0200 To: zsh-users@sunsite.dk Subject: aliases not getting expanded inside functions? X-Mailer: VM 7.07 under Emacs 19.34.1 Hi users, First, thanks Bart for the info on the C preprocessor bug. Now I'm trying to do something like % alias -g foo='bar' % escr() {print $foo} I'd expect that since the alias is global, comes before the definition of the function, and aliases are expanded when a function is read, that the function would be in effect {print $bar}, but it isn't: % which escr escr () { print $foo } The "problem" is with the $, because if I write {print foo} instead of {print $foo} in the definition the function appears as {print bar}, as I expected. Is this correct? If so, is there a way to achieve this substitution? This is in a script, not interactive. Thanks in advance.