summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-05-06 07:39:26 +0530
committerAndinus <andinus@nand.sh>2020-05-06 07:39:26 +0530
commitb1b562d411d8a9e55cbc0dc761cf4a300b6798ec (patch)
tree3a72c0e0799792482b336511d8d8d9276ce1e3c7
parent5c50bc3b92df1cff7ac0061fcbe0979c6ee61502 (diff)
downloadpictor-b1b562d411d8a9e55cbc0dc761cf4a300b6798ec.tar.gz
Support "pictor is term" syntax
"pictor is term" looks better, even better if user renames this to wtf
then user would be able to run "wtf is wtf" instead of the boring
"pictor wtf" or "wtf wtf".
-rwxr-xr-xpictor.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/pictor.pl b/pictor.pl
index de255ef..608c879 100755
--- a/pictor.pl
+++ b/pictor.pl
@@ -18,6 +18,12 @@ if (@ARGV < 1) {
     exit 1;
 } else {
     $term = $ARGV[0];
+
+    # User can rename this program to "wtf" & run "wtf is wtf" too
+    # instead of "wtf wtf" or "pictor wtf", "wtf is term" looks
+    # better.
+    $term = $ARGV[1] if
+	($ARGV[0] eq "is")
 }
 
 # files contains list of all files to search for acronyms.