The help text output by the default help subcommand doesn't seem proper to me:
- The
USAGE section doesn't show -h, --help, or --version if they are autogenerated
- The
USAGE section doesn't indicate that <subcommand> is optional, or that it can be followed by additional arguments
- The
OPTIONS section lists --version before -h, --help, but I think they should be sorted alphabetically
- The
SUBCOMMANDS section doesn't show help … Show help information., which I think should be inserted alphabetically in the subcommand list
ArgumentParser version:
main
Swift version: Paste the output of swift --version here.
swift-driver version: 1.127.14.1 Apple Swift version 6.2.1 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
Target: arm64-apple-macosx26.0
Checklist
Steps to Reproduce
Run the help subcommand of a command that has both a default help subcommand and that has CommandConfiguration.version set. They needn't exist together, but doing this shows both problems at once.
Expected behavior
Top-level help output:
OVERVIEW: Command
USAGE: cmd [(-h | --help) [<subcommand>] | --version | <subcommand> *…]
OPTIONS:
-h, --help Show help information.
--version Show the version.
SUBCOMMANDS:
a A
b B
c C
help Show help information.
Actual behavior
Top-level help output:
OVERVIEW: Command
USAGE: cmd <subcommand>
OPTIONS:
--version Show the version.
-h, --help Show help information.
SUBCOMMANDS:
a A
b B
c C
The help text output by the default help subcommand doesn't seem proper to me:
USAGEsection doesn't show-h,--help, or--versionif they are autogeneratedUSAGEsection doesn't indicate that<subcommand>is optional, or that it can be followed by additional argumentsOPTIONSsection lists--versionbefore-h, --help, but I think they should be sorted alphabeticallySUBCOMMANDSsection doesn't showhelp … Show help information., which I think should be inserted alphabetically in the subcommand listArgumentParser version:
main
Swift version: Paste the output of
swift --versionhere.swift-driver version: 1.127.14.1 Apple Swift version 6.2.1 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
Target: arm64-apple-macosx26.0
Checklist
mainbranch of this packageSteps to Reproduce
Run the
helpsubcommand of a command that has both a defaulthelpsubcommand and that hasCommandConfiguration.versionset. They needn't exist together, but doing this shows both problems at once.Expected behavior
Top-level help output:
Actual behavior
Top-level help output: