summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorpgoyette <pgoyette@NetBSD.org>2018-01-17 03:03:59 +0000
committerpgoyette <pgoyette@NetBSD.org>2018-01-17 03:03:59 +0000
commit43b244438b30a37b6973c653c65572e8742b6d26 (patch)
tree4444bd3e89a4c63b4decb08dc9901f2636673e7d /games
parent00fa5d55de782359dd7797df4c44da65b255c635 (diff)
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.
Diffstat (limited to 'games')
-rw-r--r--games/wtf/wtf6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/wtf/wtf b/games/wtf/wtf
index 53d5107c299..ace03327dd3 100644
--- a/games/wtf/wtf
+++ b/games/wtf/wtf
@@ -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