diff options
author | Andinus <andinus@nand.sh> | 2020-06-11 02:29:15 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-06-11 02:29:15 +0530 |
commit | 85fef5bde7e47c5dc9a4463a000cc0049ef7b5f9 (patch) | |
tree | 17db0e11d992b8e8428dbf4ccb9cea9976e51414 | |
parent | 8aa68033673c38827e4809dd16c4752a3db16a49 (diff) | |
download | pictor-85fef5bde7e47c5dc9a4463a000cc0049ef7b5f9.tar.gz |
Ignore "is" operand if passed
Bad idea to remove existing feature.
-rwxr-xr-x | pictor.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pictor.pl b/pictor.pl index 82a797a..b74220b 100755 --- a/pictor.pl +++ b/pictor.pl @@ -21,10 +21,16 @@ pledge( qw( stdio rpath unveil ) ) # User must pass at least one argument. die "usage: pictor term\n" - if @ARGV < 1; + unless @ARGV > 0; my $term = $ARGV[0]; +# Ignore "is" operand if it's passed. +if ( $ARGV[0] eq "is" + and @ARGV > 1 ) { + $term = $ARGV[1]; +} + # files contains list of all files to search for acronyms. my @files = ( '/usr/local/share/misc/acronyms', |