Conversation
434c4ec to
ab407ab
Compare
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
|
Feel free to reject this suggestion as naive and/or too terrible to contemplate: Would it be plausible to use the clap builder API to construct a parallel |
|
...though it occurs to me that you may be complaining about clap_complete itself and not our weird subcommand shenanigans. |
|
I would dearly love to use
So I don't see a path to success with it for now, even with constructing a parallel Command tree, sorry. |
|
In shock news, The trouble is that for parameter completion it relies on a first-last pattern, e.g. In theory By contrast, Well, time to put this away for another year I guess, until I feel ready to fall in love with another completions technology that will also disappoint me. |
I should know by now that these PRs only end in tears.
This uses a technique explored in https://github.com/karthik2804/spin-autocomplete. The idea is, instead of generating completions directly or going through the flawed clap-complete, we generate a YAML file (it's JSON, but JSON is YAML so I don't have to deal with actual YAML), then we can run completely over it, thus:
So we can get a high level of control over the completions, but without a separate binary or handcrafting bash.
Note as per Karthik's repo this relies on
bashcompinitto work on zsh - sorry.Draft because file completions are not cat-like and I am recruiting fellow believers to fix my ignorance.