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

Insufficient option usage help #333

Closed
atombender opened this issue Feb 17, 2016 · 1 comment
Closed

Insufficient option usage help #333

atombender opened this issue Feb 17, 2016 · 1 comment
Labels
help wanted please help if you can!

Comments

@atombender
Copy link

It's possible to write this:

        cli.StringFlag{
            Name:  "config, c",
            Usage: "Load configuration from this file",
        },

Now the help says:

GLOBAL OPTIONS:
   --config, -c     Load configuration from this file
  [...]

But this doesn't tell the end user that the flag takes a value. The usual way is to show that it is:

   --config FILE, -c FILE   Load configuration from FILE

As far as I can see, you can't do this. The flag package, of course, has its own way:

flag.String("c", "", "Load configuration from `file`")

Here, the backtick-enclosed part of the help will be used to infer what the name of the value is.

@jszwedko
Copy link
Contributor

Agreed, support for placeholders would be nice. Thanks for the idea!

@jszwedko jszwedko added the help wanted please help if you can! label Feb 17, 2016
jszwedko added a commit that referenced this issue Apr 26, 2016
Parses usage placeholders via back quotes. Resolves #333
moskyb added a commit to buildkite/agent that referenced this issue May 22, 2022
urfave/cli, our CLI library, has [special handling](urfave/cli#333) for backticks (`) in helptext, which in our case leads to some (but not all 🙃) of the backticks getting swallowed., so we replacethem with something that looks kinda like a backtick.
moskyb added a commit to buildkite/agent that referenced this issue May 22, 2022
urfave/cli, our CLI library, has [special handling](urfave/cli#333) for backticks (`) in helptext, which in our case leads to some (but not all 🙃) of the backticks getting swallowed., so we replacethem with something that looks kinda like a backtick.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted please help if you can!
Projects
None yet
Development

No branches or pull requests

2 participants