Improve error reporting for unknown options tig-0.4
authorJonas Fonseca <fonseca@diku.dk>
Tue, 6 Jun 2006 11:35:25 +0000 (13:35 +0200)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Tue, 6 Jun 2006 11:35:25 +0000 (13:35 +0200)
It will now also show usage help.

tig.c

diff --git a/tig.c b/tig.c
index 1f36682..b827a92 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -418,7 +418,7 @@ parse_options(int argc, char *argv[])
                if (opt[0] && opt[0] != '-')
                        break;
 
-               die("unknown command '%s'", opt);
+               die("unknown option '%s'\n\n%s", opt, usage);
        }
 
        if (!isatty(STDIN_FILENO)) {