diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-11 15:59:10 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-11 15:59:10 -0800 |
commit | a221346284192af4784a1140aef9f72e72e1167f (patch) | |
tree | 6097345e7fb98475e0c7f7dd6c4d3a143fd43da6 | |
parent | 52d1690c3e1291f7d7be6b4cc39925e3fe4381e3 (diff) |
Print which arguments were unknown before giving usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xmessage.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -349,6 +349,11 @@ main (int argc, char *argv[]) } message_len = len; } else { + fputs("Unknown argument(s):", stderr); + for (int n = 1; n < argc; n++) { + fprintf(stderr, " %s", argv[n]); + } + fputs("\n\n", stderr); usage(stderr); exit(1); } |