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

Allow changing newline padding in usage messages #92

Open
msanders opened this issue Jan 22, 2020 · 1 comment
Open

Allow changing newline padding in usage messages #92

msanders opened this issue Jan 22, 2020 · 1 comment

Comments

@msanders
Copy link
Contributor

It would be nice if there were a way to disable the newline padding in usage and error messages without re-implementing the default implementations in HelpMessageGenerator. I personally think it makes sense to turn it off by default, since that's more consistent with other command line tools. E.g.:


Usage: cli <command> [options]

Commands:
  help              Prints help information
  version           Prints the current version of this app

would become:

Usage: cli <command> [options]

Commands:
  help              Prints help information
  version           Prints the current version of this app
@jakeheis
Copy link
Owner

jakeheis commented May 1, 2020

I agree that there should be a way to easily change this. The formatting used is based on docker formatting, which does include the newline, so I'm going to leave the newline as the default. To change it would look something like:

cli.helpMessageGenerator = DefaultHelpMessageGenerator(newlineAtMessageStart: false)

Does that sound good?

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