From 0a18c5330074a379db70c84764566e1a96f4d838 Mon Sep 17 00:00:00 2001 From: pgoyette Date: Wed, 17 Jan 2018 03:03:59 +0000 Subject: [PATCH] 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. --- games/wtf/wtf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/games/wtf/wtf b/games/wtf/wtf index 53d5107c2997..ace03327dd3f 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