summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-06-11 02:29:15 +0530
committerAndinus <andinus@nand.sh>2020-06-11 02:29:15 +0530
commit85fef5bde7e47c5dc9a4463a000cc0049ef7b5f9 (patch)
tree17db0e11d992b8e8428dbf4ccb9cea9976e51414
parent8aa68033673c38827e4809dd16c4752a3db16a49 (diff)
downloadpictor-85fef5bde7e47c5dc9a4463a000cc0049ef7b5f9.tar.gz
Ignore "is" operand if passed
Bad idea to remove existing feature.
-rwxr-xr-xpictor.pl8
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',