aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-08-30 01:57:31 +0530
committerAndinus <andinus@nand.sh>2020-08-30 01:57:31 +0530
commit32ad6a07d9c5a863cb209a65f5ce0d5b21e58da4 (patch)
tree55749424770b31d89eed7f775cb7d8db3bc7dff3
parent8279628044ac685a22afde07ecbb435f4fa66d30 (diff)
downloadpyxis-32ad6a07d9c5a863cb209a65f5ce0d5b21e58da4.tar.gz
Add version option
-rwxr-xr-xpyxis.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/pyxis.pl b/pyxis.pl
index 2b757ee..83c35ef 100755
--- a/pyxis.pl
+++ b/pyxis.pl
@@ -8,10 +8,12 @@ use Path::Tiny;
use Getopt::Long;
use Term::ANSIColor qw/:pushpop/;
+my $version = "Pyxis v0.1.0";
+
my %options;
GetOptions(
\%options,
- qw{ verbose help }
+ qw{ verbose help version }
) or die "Error in command line arguments\n";
if ($options{help}) {
@@ -30,6 +32,9 @@ Options:
--help
Print this help.";
exit 0;
+} elsif ($options{version}) {
+ say $version;
+ exit 0;
}
# $feeds_dir will store user's feeds.