Skip to content

Commit

Permalink
DefaultArgParser: Add version
Browse files Browse the repository at this point in the history
Now you can do `coala -v` to get `0.1.1.dirty`.

Fixes #576
  • Loading branch information
sils committed May 26, 2015
1 parent 62ecd24 commit 229c261
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions coalib/parsing/DefaultArgParser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse

from coalib.misc.i18n import _
from coalib import version_str


default_arg_parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -75,3 +76,7 @@
choices=['YES', 'NO', 'ASK'],
metavar='ENUM',
help=APPLY_HELP)
default_arg_parser.add_argument('-v',
'--version',
action='version',
version=version_str)

0 comments on commit 229c261

Please sign in to comment.