On Thu, Jun 3, 2021 at 7:34 AM Bart Schaefer wrote: > On Wed, Jun 2, 2021 at 1:58 PM Marlon Richert wrote: > > And here's another part of workers 48926 as a separate patch. > > run-help:115: parse error near `]' > > Typo? > + shift -p (( $#cmd_args + 1 - cmd_args[(i)(-|--|;)] )) cmd_args Apparently. But I've removed that line now in the new version of the patch (attached). > This change also breaks the run-help-ssh example in the documentation, > and does so in a way I think it's impossible to fix. > > 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). > It would not surprise me to find that attempting to generically parse > arguments in run-help would also break helpers for commands like "su" > and "sudo", I tried it, but it doesn't seem to be the case. > or some commands that have git-style sub-commands. My patch actually fixes an annoying case with 'run-help git'. Try pressing ^[h on, for example, 'git -C /path/to/zsh log'. Without my patch, it gives % run-help git git is /usr/bin/git error: invalid key: alias.-C No manual entry for git--C With my patch, it correctly displays help for 'git log'. Anyway, here's a new version of my patch. Let me know what you think.