jdx/usage

Extend Spec to include choices for Args

Closed this issue · 6 comments

Clap has the concept of possible values when an argument is a Enum which can be extracted using arg.get_possible_values.

A new option for the arg element to include such choices could be implemented for tools like Fig to suggest only the valid options for such argument,

jdx commented

isn't that the "choices" property on args? https://usage.jdx.dev/spec/reference/arg#arg

Oh okay so it's already a property, it's just that usage doesn't export it then. When I generate mise.usage.kdl through mise usage it doesn't contain the choices from what I've seen. Currently unclear if it's on the mise side or usage side then

Interesting, when I generated it, it didn't include it as you can see in the screenshot
image

image
jdx commented

make sure usage and mise are up-to-date

Yep that was it, somehow my forks were not sync'ed. Thanks!