Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(cli): command completion generation requires <INPUT> parameter #81

Closed
JarvisCraft opened this issue May 29, 2022 · 3 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@JarvisCraft
Copy link
Collaborator

Description

Generating Clippy's tab-completions support requires the dummu <INPUT> parameter to be present.

Steps to reproduce

  1. 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.

@JarvisCraft JarvisCraft added the bug Something isn't working label May 29, 2022
@JarvisCraft JarvisCraft added this to the v0.5.0 milestone May 29, 2022
@CertainLach
Copy link
Owner

There was no default subcommand support in clap, so it wasn't possible to implement both

jrsonnet generate
jrsonnet file.jsonnet

clap-rs/clap#975

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
Copy link
Owner

Unfortunately, it seems to be still not possible to implement correctly with current clap api

@CertainLach CertainLach removed this from the v0.5.0 milestone Jun 5, 2022
@CertainLach CertainLach added the help wanted Extra attention is needed label Jun 5, 2022
CertainLach added a commit that referenced this issue Jun 5, 2022
Fixes: #81
Signed-off-by: Yaroslav Bolyukin <[email protected]>
@CertainLach CertainLach added this to the v0.5.0 milestone Jun 5, 2022
@CertainLach
Copy link
Owner

Actually, found workaround.

@JarvisCraft JarvisCraft removed the help wanted Extra attention is needed label Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants