From 85fef5bde7e47c5dc9a4463a000cc0049ef7b5f9 Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 11 Jun 2020 02:29:15 +0530 Subject: Ignore "is" operand if passed Bad idea to remove existing feature. --- pictor.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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', -- cgit 1.4.1-2-gfad0