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

Re: run-help's man arguments



On Jun 5, 12:10pm, Peter Stephenson wrote:
}
} run-help got changed to invoke "man $@" rather than "man $1".  This was
} described as being "to allow the specification of sections and other man
} options through" (sic, presumably something missing?)

"options [to pass] through" I think.

} Nobody's ever complained about this, but this is surely weird; that's
} not how you use run-help, the $@ is the stuff on the command line
} which doesn't include anything for "man" unless you type it yourself,
} which is rather against the spirit of run-help (and very well hidden).

Someone probably mistook run-help for a function that one is intended
to be able to type out by hand (rather than invoke with a keystroke),
and wanted it to become a superset of the "man" command.  Although
how that would work for any of the other variations on where a command
is found, I have no idea.

} However, the original query remains.  Why do we need $@ rather than $1?

I don't think we ever did.  I suppose one could do something such as

    alias run-help='\run-help 1'

to try to restrict help to executable commands only, but then that will
fail for anything that is not an external command, so ...



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