summaryrefslogtreecommitdiff
path: root/poezio/args.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/args.py')
-rw-r--r--poezio/args.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/poezio/args.py b/poezio/args.py
index d0005d82..e1ebe5e0 100644
--- a/poezio/args.py
+++ b/poezio/args.py
@@ -6,6 +6,8 @@ There is a fallback to the deprecated optparse if argparse is not found
from pathlib import Path
from argparse import ArgumentParser, SUPPRESS
+from poezio.version import __version__
+
def parse_args(CONFIG_PATH: Path):
"""
@@ -33,11 +35,17 @@ def parse_args(CONFIG_PATH: Path):
help="The config file you want to use",
metavar="CONFIG_FILE")
parser.add_argument(
- "-v",
- "--version",
- dest="version",
+ '-v',
+ '--version',
+ action='version',
+ version='Poezio v%s' % __version__,
+ )
+ parser.add_argument(
+ "--custom-version",
+ dest="custom_version",
help=SUPPRESS,
metavar="VERSION",
- default="0.13-dev")
+ default=__version__
+ )
options = parser.parse_args()
return options