]> git.armaanb.net Git - charsel.git/commitdiff
added versioning
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Sun, 18 Oct 2020 12:44:43 +0000 (08:44 -0400)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Sun, 18 Oct 2020 12:44:43 +0000 (08:44 -0400)
charsel

diff --git a/charsel b/charsel
index c274ef84a53beee3aedad859a1093c6ad23c19ee..6c6fc915e6cdd58f0853be5b141aa00ad9a282dd 100755 (executable)
--- a/charsel
+++ b/charsel
@@ -19,6 +19,8 @@
 
 ########################################################################
 
+VERSION=2.0.0
+
 # Define argument functions
 function usage() {
   echo "Usage: /usr/bin/charsel [OPTION]... [CHARFILE]...
@@ -26,6 +28,7 @@ A simple terminal character selector
   -h              show this message
   -l              show installed charfiles
   -d              show readme
+  -v              print version
       --all       include hidden shortcodes
 
 Exit status:
@@ -86,7 +89,7 @@ then
 fi
 
 # Look for arguments
-while getopts ":lhd" arg
+while getopts ":lhdv" arg
 do
   case ${arg} in
     h)
@@ -101,6 +104,10 @@ do
       readme
       exit 0
       ;;
+    v)
+      echo "charsel" $VERSION
+      exit 0
+      ;;
     ?)
       echo "Invalid option"
       usage