aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-03-11 09:38:03 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-03-11 09:38:03 -0400
commit3260743bf51338ad73becd62f62f0da7d1b51e8d (patch)
treedb8e4d3f0e4f97fa1b99c9c41e8273f734e368a8 /src
parentb7785ede614064cce7d130542cd840a72231f2c1 (diff)
downloadstasis-3260743bf51338ad73becd62f62f0da7d1b51e8d.tar.gz
Print ARG next to short option output in usage statement
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
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, " ");
}