Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/wtf Don't skip the superfluous "is" argument if it's n...
details: https://anonhg.NetBSD.org/src/rev/7495c2dcef53
branches: trunk
changeset: 358806:7495c2dcef53
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed Jan 17 03:03:59 2018 +0000
description:
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:
games/wtf/wtf | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r 03cd554cca7a -r 7495c2dcef53 games/wtf/wtf
--- a/games/wtf/wtf Wed Jan 17 02:45:38 2018 +0000
+++ b/games/wtf/wtf Wed Jan 17 03:03:59 2018 +0000
@@ -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 @@
shift "$(expr "$OPTIND" - 1)"
if [ "$1" = "is" ]; then
- shift
+ if [ $# -gt 1 ] ; then
+ shift
+ fi
fi
if [ -z "$1" ]; then
Home |
Main Index |
Thread Index |
Old Index