From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24839 invoked by alias); 14 Dec 2009 13:29:27 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27511 Received: (qmail 18437 invoked from network); 14 Dec 2009 13:29:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FAKE_REPLY_C autolearn=no version=3.2.5 Received-SPF: pass (proxy.melb.primenet.com.au: SPF record at alea.gnuu.de designates 83.246.114.63 as permitted sender) X-DKIM: Sendmail DKIM Filter v2.5.2 uucp.gnuu.de 6B9EC488038 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1260797348; i=@alea.gnuu.de; bh=8MrZNVJqa8wjbPN5L+ruWjZvV8FIaoUCU Q0cwe8VdpY=; h=Date:From:To:Subject:Message-ID:MIME-Version: Content-Type; b=vQ2H15PyHXXz2jdLDShBt+3gNTtVA2oa77CGwtYFFQzMgWHHh6 x4OLvW8P1Zly1XuQcDtIz9MRIbH76Esrf9vzpTJgxOCcP9IIKxD2PiZlxD/8s7owhLl pFqxCTBux4cSkuj9jlJWYDRCzybJKF2g9qH9Gpm9kX/5rXXbJKThqk= Date: Mon, 14 Dec 2009 12:40:05 +0100 From: =?iso-8859-1?Q?J=F6rg?= Sommer To: zsh-workers@zsh.org Subject: Re: [PATCH] run-help: ugly workaround for run-help-$X with alias for $X Message-ID: <20091214114004.GA31015@alea.gnuu.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Peter, Peter Stephenson wrote: > Index: Functions/Misc/run-help > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/zsh/zsh/Functions/Misc/run-help,v > retrieving revision 1.16 > diff -u -r1.16 run-help > --- Functions/Misc/run-help 5 Jun 2009 11:18:01 -0000 1.16 > +++ Functions/Misc/run-help 10 Dec 2009 09:48:44 -0000 > @@ -49,6 +49,7 @@ > noalias=3D1 > fi > =20 > +{ > while ((i++ < $#places)) > do > what=3D$places[$i] > @@ -56,7 +57,8 @@ > builtin print -r $what > case $what in > (*( is an alias)*) > - [[ ${what[(w)6]:t} !=3D ${what[(w)1]} ]] && run-help ${what[(w)6]:t} > + [[ ${what[(w)6]:t} !=3D ${what[(w)1]} ]] && > + run_help_orig_cmd=3D${what[(w)1]} run-help ${what[(w)6]:t} > +} always { > + unset run_help_orig_cmd > +} Why do you need the unset here? In Posix shell an expression =E2=80=9CVAR= =3Dxy cmd=E2=80=9D exports the variable VAR only to the command cmd, but doesn't = export or set it in the current environment. I zsh different here? Bye, J=C3=B6rg. --=20 IRC: Der [Prof. Andreas Pfitzmann, TU Dresden] hat gerade vorgeschlagen, sie sollen doch statt Trojanern die elektromagnetische Abstrahlung nutzen. Das sei nicht massenf=C3=A4hig, ginge ohne Eingriff ins System, sei zielgeric= htet, und, der Hammer, das funktioniere ja bei Wahlcomputern schon sehr gut. --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAksmJBQACgkQwe0mZwH1VIBJNwCfX4Qi2Y5IGC5PxVzQGD0X50Eo XVEAmwZypz0kCc1zJtwspfaB/kmzui9k =wONZ -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--