From 3260743bf51338ad73becd62f62f0da7d1b51e8d Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 11 Mar 2024 09:38:03 -0400 Subject: Print ARG next to short option output in usage statement --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index ed24287..0a5d6ba 100644 --- a/src/main.c +++ b/src/main.c @@ -111,6 +111,9 @@ static void usage(char *progname) { if (long_options[x].val <= 'z') { strcat(opt_short, "-"); opt_short[1] = (char) long_options[x].val; + if (long_options[x].has_arg) { + strcat(opt_short, " ARG"); + } } else { strcat(opt_short, " "); } -- cgit