Add httpie --version (#1220)

This commit is contained in:
Batuhan Taskaya 2021-11-30 13:18:37 +03:00 committed by GitHub
parent 245cede2c2
commit 3081fc1a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
from textwrap import dedent
from httpie.cli.argparser import HTTPieManagerArgumentParser
from httpie import __version__
COMMANDS = {
'plugins': {
@ -90,4 +91,14 @@ parser.add_argument(
'''
)
parser.add_argument(
'--version',
action='version',
version=__version__,
help='''
Show version and exit.
'''
)
generate_subparsers(parser, parser, COMMANDS)