bug(cli): command completion generation requires `<INPUT>` parameter
JarvisCraft opened this issue · 3 comments
JarvisCraft commented
Description
Generating Clippy's tab-completions support requires the dummu <INPUT>
parameter to be present.
Steps to reproduce
- Run
$ jrsonnet generate bash
bash
can be replaced with any supported shell.
Expected behaviour
Tab-completion code is generated for the provided shell.
Observed behaviour
error: The following required arguments were not provided:
<INPUT>
USAGE:
jrsonnet [OPTIONS] <INPUT> [SUBCOMMAND]
For more information try --help
Tab-completion code is geneated only in presence of (any) <INPUT>
parammeter value.
CertainLach commented
There was no default subcommand support in clap, so it wasn't possible to implement both
jrsonnet generate
jrsonnet file.jsonnet
Now, as it is implemented, there would be two subcommands:
jrsonnet generate bash
jrsonnet compile file.jsonnet
And if subcommand is not specified, it should default to jrsonnet compile
CertainLach commented
Unfortunately, it seems to be still not possible to implement correctly with current clap api
CertainLach commented
Actually, found workaround.