zsh-workers
 help / color / mirror / code / Atom feed
From: "Jörg Sommer" <joerg@alea.gnuu.de>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] run-help: ugly workaround for run-help-$X with alias for $X
Date: Mon, 14 Dec 2009 12:40:05 +0100	[thread overview]
Message-ID: <20091214114004.GA31015@alea.gnuu.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

Hi Peter,

Peter Stephenson <pws@csr.com> wrote:
> Index: Functions/Misc/run-help
> ===================================================================
> 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=1
>  fi
>  
> +{
>  while ((i++ < $#places))
>  do
>      what=$places[$i]
> @@ -56,7 +57,8 @@
>      builtin print -r $what
>      case $what in
>      (*( is an alias)*)
> -	[[ ${what[(w)6]:t} != ${what[(w)1]} ]] && run-help ${what[(w)6]:t}
> +	[[ ${what[(w)6]:t} != ${what[(w)1]} ]] &&
> +	  run_help_orig_cmd=${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 “VAR=xy
cmd” 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örg.
-- 
IRC: Der [Prof. Andreas Pfitzmann, TU Dresden] hat gerade vorgeschlagen, sie
  sollen doch statt Trojanern die elektromagnetische Abstrahlung nutzen. Das
  sei nicht massenfähig, ginge ohne Eingriff ins System, sei zielgerichtet,
  und, der Hammer, das funktioniere ja bei Wahlcomputern schon sehr gut.

[-- Attachment #2: Digital signature http://en.wikipedia.org/wiki/OpenPGP --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2009-12-14 13:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 11:40 Jörg Sommer [this message]
2009-12-14 13:42 ` Peter Stephenson
2009-12-14 15:50   ` Bart Schaefer
2009-12-14 16:38     ` Andrey Borzenkov
2009-12-14 17:01       ` Bart Schaefer
2009-12-16 10:57     ` Peter Stephenson
2009-12-18 13:51       ` Jörg Sommer
  -- strict thread matches above, loose matches on Subject: below --
2009-12-07  0:57 Jörg Sommer
2009-12-10  9:49 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091214114004.GA31015@alea.gnuu.de \
    --to=joerg@alea.gnuu.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).