autocomplete
autocomplete copied to clipboard
MobiledgeX mcctl
Sanity checks
- [X] My issue relates to a specific CLI completion spec (e.g.
git checkoutis missing options ingitcompletion spec). If your issue is more general, please create your issue here: withfig/fig - [X] I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue
- [X] I would like to work on this.
What CLI tool does this relate to?
mcctl
Which statement makes the most sense?
This completion spec does not exist
Issue Details
Our CLI is in the general format command subcommand option=value I'm struggling to get suggestions to work for the value. Seems to work fine if it is --option=value but not without the dashes. Example option
region: {
name: "region",
description:
"Region name",
requiresEquals: true,
args: {
name: "region",
suggestions: [
"EU",
"JP",
"US",
],
}
}
Also, I have a bunch of non-hyphen options. After typing command sub-command
Related: withfig/fig#638
This can be worked around with generators, but I think it's worth waiting until this is natively supported.
(Previously I'd given an example of a generator here, but it didn't work)
With https://github.com/withfig/fig/issues/638 closed this should work out of the box. I've just tested your example option in a spec locally and it seems to be working as expected
Fwiw, this is fixed now!