Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
bashcompinit
to work on zsh - sorry.Draft because file completions are not cat-like and I am recruiting fellow believers to fix my ignorance.