Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Why run-help gets the expanded command?

On Fri, 20 Feb 2009 13:53:20 +0000 (UTC)
JÃrg Sommer <joerg@xxxxxxxxxxxx> 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@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/

Messages sorted by: Reverse Date, Date, Thread, Author