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

Getting --help to print descriptions for arguments #2170

Open
Reikimann opened this issue Jul 14, 2024 · 0 comments
Open

Getting --help to print descriptions for arguments #2170

Reikimann opened this issue Jul 14, 2024 · 0 comments

Comments

@Reikimann
Copy link

Reikimann commented Jul 14, 2024

Hey, I wanted to check the progress on getting --help to print the ValidArgs for a cmd.

Almost every big arg-parser provided this functionality.
Some have already written issues for this functionality; the first written is almost 7 years old. (See #571, #1210 and #842

I see that this project is working on adding wonderful features such as internationalization, but it doesn't seem as necessary as being able to provide help from the cmdline to users.

I'm writing a commandline tool with cobra and I need an init-cmd to generate the shell configuration needed for the tool, but I have no way of providing the information to the user regarding which shells are available.

Zoxide, which uses Rust Clap, provides the user with the available shells they can use like this:

Generate shell configuration

Usage:
  zoxide init [OPTIONS] <SHELL>

Arguments:
  <SHELL>  [possible values: bash, elvish, fish, nushell, posix, powershell, xonsh, zsh]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant