Closed matthewweis closed 1 year ago
It seems that it would be better to make the script as a Slash script and make the cli.sc
as the script argument, then put it in the /bin directory. What do you think?
Good idea, the /bin
directory does seem more appropriate. I have updated the PR accordingly and am open to any feedback.
I can also make the script accept the CliOpt JSON directly (instead of invoking cli.sc
from within the script) if preferable.
Adds a standalone Slang script that can generate cli completions for the
sireum
command. It is completely optional, and works similar tocli.sc
(except it outputs completions instead of CliOpts as JSON). The script will work for any validcli.sc
and has been placed next to the top-levelcli.sc
in order to generate completions for all tools when ran. It recognizes a number of special cases, such as enums and flags expecting files. Here is a demo gif.I am happy to make any changes to the code as needed.
Example Usage: