SwiftCLI
SwiftCLI copied to clipboard
Allow changing newline padding in usage messages
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
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?