diff options
author | pgoyette <pgoyette@NetBSD.org> | 2018-01-17 03:03:59 +0000 |
---|---|---|
committer | pgoyette <pgoyette@NetBSD.org> | 2018-01-17 03:03:59 +0000 |
commit | 18958ee2a20b22fe016fc80f46385a0c7cbe04f1 (patch) | |
tree | e32b9b73099c0a0e354ec87ac9d3ae4f694040de /wtf | |
parent | f87bbed44c0917a66f46a96b79abcf8ec6796e4c (diff) | |
download | bsdgames-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/wtf | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |