Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And adjust 'runc --version' to print exactly the same content. The $ COMMAND --version interface is a popular one for this information and makes a lot of sense for single-action commands. For example, printf(1) [1] is only ever going to do one meaningful thing, so --version, --help, and other command-like actions work well as options. Umbrella commands with multiple sub-commands, on the other hand, have a more consistent interface if '... and exit' actions get their own sub-commands. That allows you to declare an interface like: $ COMMAND [global-options] SUB-COMMAND [sub-command-specific-options] [sub-command-specific-arguments] without having to say "except if you use a sub-command-like global option, in which case SUB-COMMAND is not allowed". With this commit, we add support for 'version' while keeping --version, because while 'version' makes more sense for umbrella commands, a user may not know if runc is an umbrella command when they ask for the version. Existing umbrella commands are not particularly consistent: * git(1) supports both --version and 'version', --help and 'help'. * btrfs(8) supports both --version and 'version', --help and 'help'. * ip(1) supports -V / -Version and 'help'. * npm supports 'version' and 'help'. * pip supports '--version', --help and 'help'. [1]: http://www.man7.org/linux/man-pages/man1/printf.1.html Signed-off-by: W. Trevor King <[email protected]>
- Loading branch information