Skip to content

Conversation

@natecook1000
Copy link
Member

This adds some new messages to error and help output that guide users to find more information.

Validation errors now include a message about using --help:

$ roll --bad-flag
Error: Unknown option '--bad-flag'
Usage: roll [--times <n>] [--sides <m>] [--seed <seed>] [--verbose]
  See 'roll --help' for more information.

The help screen now shows a message about the implicit help subcommand when the help screen contains subcommands:

$ math --help
OVERVIEW: A utility for performing maths.

USAGE: math <subcommand>

OPTIONS:
  --version               Show the version.
  -h, --help              Show help information.

SUBCOMMANDS:
  add                     Print the sum of the values.
  multiply                Print the product of the values.
  stats                   Calculate descriptive statistics.

  See 'math help <subcommand>' for detailed help.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 changed the title Nate/see help messages Additional help messages May 22, 2020
@natecook1000 natecook1000 merged commit 85196ee into master May 22, 2020
@natecook1000 natecook1000 deleted the nate/see_help_messages branch May 22, 2020 22:04
@natecook1000 natecook1000 restored the nate/see_help_messages branch May 24, 2020 23:59
@natecook1000 natecook1000 deleted the nate/see_help_messages branch February 1, 2022 06:02
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

Successfully merging this pull request may close these issues.

2 participants