You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is going to be tricky. I managed to implement some commands like mise settings --complete that lists completions for settings which works similarly:
$ mise settings --complete
activate_aggressive:Pushes tools' bin-paths to the front of PATH instead of allowing modifications of PATH after activation to take precedence.
all_compile:do not use precompiled binaries for any tool
always_keep_download:should mise keep downloaded files after installation
always_keep_install:should mise keep install files after installation even if the installation fails
Settings are fairly simple though because they're well-defined and we have the SETTINGS_META hash that gives us all the settings with their descriptions. For config, we don't really have a formal definition of what the config looks like, and it's much more complex.
For example, you should get this (ignoring descriptions to keep it simple but the actual solution should have descriptions too):
$ mise cfg --complete
env
tools
settings
...
And in order to dive in further:
$ mise cfg --complete settings.
settings.activate_aggressive
settings.all_compile
...
But this should also work with things like tools.node. and tasks.foo..
Now we do have the json schema, but we don't read that in mise anywhere and I don't think parsing that in a useful way would be very easy at all.
2 other ideas aside from json schema:
make mise cfg --complete written completely manually with all the options manually defined
create a new file like settings.toml that's used to generate both the json schema and these completions
I like the last idea the best since it would make it easier to stay up-to-date with changes in json schema but I'm not sure how well it would come together.
The text was updated successfully, but these errors were encountered:
Having a well-defined config schema file in toml might be useful for doc generation too. It might be wise to keep json schema separated from this since json schema is quite complex. Maybe we could have a mise-config.toml schema file we just use for doc generation and mise cfg completions but nothing else.
If nothing else that is probably a good way to start. We could begin there and if it makes sense to merge json schema and maybe config parsing we could do that later.
this is going to be tricky. I managed to implement some commands like
mise settings --complete
that lists completions for settings which works similarly:Settings are fairly simple though because they're well-defined and we have the SETTINGS_META hash that gives us all the settings with their descriptions. For config, we don't really have a formal definition of what the config looks like, and it's much more complex.
For example, you should get this (ignoring descriptions to keep it simple but the actual solution should have descriptions too):
And in order to dive in further:
But this should also work with things like
tools.node.
andtasks.foo.
.Now we do have the json schema, but we don't read that in mise anywhere and I don't think parsing that in a useful way would be very easy at all.
2 other ideas aside from json schema:
mise cfg --complete
written completely manually with all the options manually definedI like the last idea the best since it would make it easier to stay up-to-date with changes in json schema but I'm not sure how well it would come together.
The text was updated successfully, but these errors were encountered: