args icon indicating copy to clipboard operation
args copied to clipboard

feat: show aliases in usage

Open gkc opened this issue 1 year ago • 0 comments

  • [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.

What I did

  • Add a flag to allow option alias(es) to be output by ArgParser's usage
  • The default behaviour remains the same - i.e. aliases are not printed in usage
  • Kind of like what is requested in https://github.com/dart-lang/args/issues/240 but for ArgParsers' Options, not CommandRunners' Commands

How I did it

  • usage_test.dart:
    • Add a test to verify that aliases are shown for options if requested
    • Add a test to verify that aliases are not shown for options by default
  • usage.dart: make _longOption also show aliases, if any, if showAliases is true
  • added showAliases parameters in various places so that we can preserve current behaviour as default
  • updated CHANGELOG.md

gkc avatar Jan 24 '24 11:01 gkc