From 18958ee2a20b22fe016fc80f46385a0c7cbe04f1 Mon Sep 17 00:00:00 2001 From: pgoyette Date: Wed, 17 Jan 2018 03:03:59 +0000 Subject: 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. --- wtf/wtf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wtf') 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 -- cgit v1.2.3-56-ge451