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

Help Option Text #76

Closed
runeimp opened this issue Apr 14, 2019 · 1 comment
Closed

Help Option Text #76

runeimp opened this issue Apr 14, 2019 · 1 comment

Comments

@runeimp
Copy link

runeimp commented Apr 14, 2019

Thank you for this library! 😃

I would like a way to be able to use my own text for the help flags though. Also to be able to specify my own short flag. Either by being able to specify my own explicit Help field

type args struct {
	Debug bool `arg:"-D" help:"Output debug info."`
	Help  bool `arg:"-H" help:"Display this help info."`
}

Or by method call such as:

arg.HelpOption("Display this help info.", "-H")

or something along the lines of

arg.SetHelpText("Display this help info.")
arg.SetHelpShort("-H")
@runeimp runeimp changed the title Help Text Help Option Text Apr 14, 2019
@alexflint
Copy link
Owner

Hey @runeimp, the suggestion you made is actually already implemented:

type args struct {
	Debug bool `arg:"-D" help:"Output debug info."`
	Help  bool `arg:"-H" help:"Display this help info."`
}

should work just as you describe. Feel free to reopen if this doesn't work for you.

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

2 participants