summaryrefslogtreecommitdiffstats
path: root/wtf
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
commit18958ee2a20b22fe016fc80f46385a0c7cbe04f1 (patch)
treee32b9b73099c0a0e354ec87ac9d3ae4f694040de /wtf
parentf87bbed44c0917a66f46a96b79abcf8ec6796e4c (diff)
downloadbsdgames-darwin-18958ee2a20b22fe016fc80f46385a0c7cbe04f1.tar.gz
bsdgames-darwin-18958ee2a20b22fe016fc80f46385a0c7cbe04f1.tar.zst
bsdgames-darwin-18958ee2a20b22fe016fc80f46385a0c7cbe04f1.zip
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 'wtf')
-rw-r--r--wtf/wtf6
1 files changed, 4 insertions, 2 deletions
diff --git a/wtf/wtf b/wtf/wtf
index 53d5107c..ace03327 100644
--- a/wtf/wtf
+++ b/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