diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-11 16:28:12 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-11 16:28:12 -0800 |
commit | c3f4b549c080a400f2fd2cb8daa8702f7f287e21 (patch) | |
tree | 17c5193c43618505bb9489b0d05074fce43b4c8f | |
parent | f22538b6e6b2a44f87ad7e6a9e39712f5f58d39e (diff) |
Print which arguments were unknown before giving usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | init.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -373,7 +373,14 @@ void InitializeWorld(int argc, char **argv) &argc, argv, FallbackResources, sessionShellWidgetClass, shell_args, XtNumber(shell_args)); - if (argc > 1) Syntax(progName); + if (argc > 1) { + fputs("Unknown argument(s):", stderr); + for (int n = 1; n < argc; n++) { + fprintf(stderr, " %s", argv[n]); + } + fputs("\n\n", stderr); + Syntax(progName); + } XSetIOErrorHandler(_IOErrorHandler); |