summaryrefslogtreecommitdiff
path: root/wal
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-06-22 11:02:51 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-06-22 11:02:51 +1000
commit104f731239fe5229ac2b59b51fb5d522ee856380 (patch)
tree98da13a1c391678f87f51c9e0c2903f502863e7b /wal
parent7854b051702117a02d54822842edf5f69135a90d (diff)
Args: Added -v to print version
Diffstat (limited to 'wal')
-rwxr-xr-xwal10
1 files changed, 9 insertions, 1 deletions
diff --git a/wal b/wal
index 80769af..0d46d5c 100755
--- a/wal
+++ b/wal
@@ -67,6 +67,9 @@ def get_args():
help="Fix artifacts in VTE Terminals. \
(Termite, xfce4-terminal)")
+ arg.add_argument("-v", action="store_true",
+ help="Print \"wal\" version.")
+
return arg.parse_args()
@@ -92,6 +95,11 @@ def process_args(args):
if args.r:
reload_colors(args.t)
+ # -v
+ if args.v:
+ print("wal %s" % (__version__))
+ exit(0)
+
# -i
if args.i:
image = str(get_image(args.i))
@@ -517,7 +525,7 @@ def reload_colors(vte):
sequences = bytes(sequences, "utf-8").decode("unicode_escape")
print(sequences, end="")
- quit()
+ exit(0)
def save_file(colors, export_file):