From 9433d473757b42b9c86e4cb5a264ff10b93bcda4 Mon Sep 17 00:00:00 2001 From: Paul Nameless Date: Thu, 22 Apr 2021 10:59:34 +0300 Subject: [PATCH] Add version to command line arg --- tg/__main__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tg/__main__.py b/tg/__main__.py index 5736da5..3f861b1 100644 --- a/tg/__main__.py +++ b/tg/__main__.py @@ -63,4 +63,11 @@ def main() -> None: if __name__ == "__main__": + import sys + if len(sys.argv) > 1 and sys.argv[1] in ("-v", "--version"): + import tg + print("Terminal Telegram client") + # print("Version:", tg.__version__) + print("Version:", tg.__version__) + exit(0) main()