Module Name:    src
Committed By:   pgoyette
Date:           Wed Jan 17 03:03:59 UTC 2018

Modified Files:
        src/games/wtf: wtf

Log Message:
Don't skip the superfluous "is" argument if it's not superfluous!

This allows us to use `wtf is` and get information for the acronym "is"
and produces the same output as `wtf is is` withough requiring the extra
typing by the user.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/games/wtf/wtf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/wtf/wtf
diff -u src/games/wtf/wtf:1.21 src/games/wtf/wtf:1.22
--- src/games/wtf/wtf:1.21	Tue Apr 21 23:56:30 2015
+++ src/games/wtf/wtf	Wed Jan 17 03:03:59 2018
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: wtf,v 1.21 2015/04/21 23:56:30 christos Exp $
+#	$NetBSD: wtf,v 1.22 2018/01/17 03:03:59 pgoyette Exp $
 #
 # Public domain
 #
@@ -30,7 +30,9 @@ done
 shift "$(expr "$OPTIND" - 1)"
 
 if [ "$1" = "is" ]; then
-	shift
+	if [ $# -gt 1 ] ; then
+		shift
+	fi
 fi
 
 if [ -z "$1" ]; then

Reply via email to