zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Subject: Re: Why run-help gets the expanded command?
Date: Fri, 20 Feb 2009 21:43:38 +0000	[thread overview]
Message-ID: <20090220214338.66722410@pws-pc> (raw)
In-Reply-To: <slrngptdeg.2hh.joerg@alea.gnuu.de>

On Fri, 20 Feb 2009 13:53:20 +0000 (UTC)
Jörg Sommer <joerg@alea.gnuu.de> wrote:
> I've defined some aliases like wget='noglob wget'. Running run-help
> (ESC h) for these commands gives me the help for noglob. I've checked and
> run-help is called with noglob, i.e. the expanded command and not the one
> typed in by the user.

I'm not quite sure what that was trying to achieve, since it doesn't do
this for which-command.  It was possibly a better guess with older
versions of run-help, but the current one will actually track back through
aliases to see what commands they call so it's particularly unhelpful to
be stuck with the noglob.

Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.98
diff -u -r1.98 zle_tricky.c
--- Src/Zle/zle_tricky.c	5 Jan 2009 11:14:53 -0000	1.98
+++ Src/Zle/zle_tricky.c	20 Feb 2009 21:41:10 -0000
@@ -2799,8 +2799,7 @@
     char *s;
     int m = zmult, na = noaliases;
 
-    if (!strcmp(bindk->nam, "which-command"))
-	noaliases = 1;
+    noaliases = 1;
     s = getcurcmd();
     noaliases = na;
     if (!s)

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  reply	other threads:[~2009-02-20 21:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 13:53 Jörg Sommer
2009-02-20 21:43 ` Peter Stephenson [this message]
2009-02-21  1:25   ` Bart Schaefer

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=20090220214338.66722410@pws-pc \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@sunsite.dk \
    /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).