aboutsummaryrefslogtreecommitdiff
path: root/rainbow_parenthesis/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--rainbow_parenthesis/__main__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rainbow_parenthesis/__main__.py b/rainbow_parenthesis/__main__.py
index d600806..7e820fc 100644
--- a/rainbow_parenthesis/__main__.py
+++ b/rainbow_parenthesis/__main__.py
@@ -5,7 +5,7 @@ Reads a string from stdin, and outputs it to stdout with all
parenthesis prettily colored.
"""
-from . import colorize, Colored
+from . import colorize, Colored, __version__
from . import term
import argparse
@@ -20,6 +20,9 @@ def build_argparse() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(prog='rainbow')
parser.add_argument('input', type=argparse.FileType('r'),
nargs='?', default='-')
+ parser.add_argument('--version',
+ action='version',
+ version=f'%(prog)s {__version__}')
return parser