From 32ad6a07d9c5a863cb209a65f5ce0d5b21e58da4 Mon Sep 17 00:00:00 2001 From: Andinus Date: Sun, 30 Aug 2020 01:57:31 +0530 Subject: Add version option --- pyxis.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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. -- cgit 1.4.1-2-gfad0