Zsh Mailing List Archive
Messages sorted by:
Re: Let run-help filter cmd_args before calling run-help-<command> (was Re: [RFC][PATCH] Try calling command with help flags in run-help)
- X-seq: zsh-workers 49011
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Marlon Richert <marlon.richert@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Let run-help filter cmd_args before calling run-help-<command> (was Re: [RFC][PATCH] Try calling command with help flags in run-help)
- Date: Thu, 3 Jun 2021 16:33:04 -0700
- Archived-at: <https://zsh.org/workers/49011>
- In-reply-to: <CAHLkEDuPgBaNoGyu-io=0HKB1FxOpHGoHYUXHQSrwztMuEMVAw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDsDG7X9+oN8AowUoqcPU731tHALXJGvaqkxV8XnR2kULg@mail.gmail.com> <CAH+w=7Y1M-TkTJNb0q8LECy6-fViN=As5cn6KohneyeDLdPv4Q@mail.gmail.com> <CAHLkEDvhcTi-q-yKiwYAhyuSWTjB-mof0RCKqWyhmFrFQjPOsA@mail.gmail.com> <CAH+w=7YZVzbKde3NOaDxYSzJRwyWRTLc=RHOX4XATSBOT=Tvcw@mail.gmail.com> <CAHLkEDuPgBaNoGyu-io=0HKB1FxOpHGoHYUXHQSrwztMuEMVAw@mail.gmail.com>
On Thu, Jun 3, 2021 at 2:27 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> On Thu, Jun 3, 2021 at 7:34 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > Stupid example, but:
> > % ssh -- localhost date
> > Without the patch, run-help displays help for the "date" command.
> > With it, help for "ssh".
> That's weird. For me, it gets help for 'ssh', both before and after
> the patch (on commit bd328a2).
As mentioned elsewhere, you do have to manually load run-help-ssh into
your test shell, it is not an autoloadable file.
> My patch actually fixes an annoying case with 'run-help git'. Try
> pressing ^[h on, for example, 'git -C /path/to/zsh log'.
This works for me, with or without your patch, using the git
completion in the current repository head. Are you sure you're
loading functions from the right path?
> Anyway, here's a new version of my patch. Let me know what you think.
I don't see any obvious problems with it but I don't know how to
construct a test case for any of the helpers you've edited. It would
be nice to know that this does not break the un-edited versions of
those helpers, because if those changes are required rather than just
redundant code removal, other helpers in the wild would also require
Messages sorted by: