From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13640 invoked from network); 3 Jan 2003 15:46:06 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 3 Jan 2003 15:46:06 -0000 Received: (qmail 5828 invoked by alias); 3 Jan 2003 15:45:53 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5642 Received: (qmail 5817 invoked from network); 3 Jan 2003 15:45:52 -0000 Date: Fri, 3 Jan 2003 16:45:52 +0100 From: Phil Pennock To: zsh-users@sunsite.dk Subject: Re: aliases not getting expanded inside functions? Message-ID: <20030103164552.A28966@globnix.org> Mail-Followup-To: zsh-users@sunsite.dk References: <15893.44217.393956.262362@fisica.ufpr.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15893.44217.393956.262362@fisica.ufpr.br>; from carlos@fisica.ufpr.br on Fri, Jan 03, 2003 at 01:31:05PM -0200 X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine and mine alone. Such views do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2003-01-03 at 13:31 -0200, Carlos Carvalho wrote: > Now I'm trying to do something like >=20 > % alias -g foo=3D'bar' > % escr() {print $foo} % bar=3D'Fred Bloggs' % foo=3D'bar' % function escr { print ${(P)foo} } % escr Fred Bloggs % > If so, is there a way to achieve this > substitution? This is in a script, not interactive. Is the above sufficient? You might wish to read zshexpn(1), since there are many other weird and wonderful ways in which zsh can pervert your data on demand. --=20 "We've got a patent on the conquering of a country through the use of force. We believe in world peace through extortionate license fees." -- Andy Fors= ter --azLHFNyN32YCQGCU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (OpenBSD) iD8DBQE+FbAvfDS04Uzk9lURAu6ZAJsGkekUH1lQV1dxN3oXiseeFKWvZwCfWZjT E9Lahu2sR+3QA7lsVn5XT4o= =Sb0D -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--