Merge pull request #2034 from hroff-1902/option-version

minor: add -V alias for --version
This commit is contained in:
Matthias 2019-07-18 14:06:05 +02:00 committed by GitHub
commit fbd229810f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ optional arguments:
-h, --help show this help message and exit
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--logfile FILE Log to the file specified
--version show program's version number and exit
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default: None). Multiple
--config options may be used. Can be set to '-' to

View File

@ -44,7 +44,7 @@ AVAILABLE_CLI_OPTIONS = {
metavar='FILE',
),
"version": Arg(
'--version',
'-V', '--version',
action='version',
version=f'%(prog)s {__version__}',
),