diff options
-rw-r--r-- | swaymsg/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index e629bcc2..2f2e843a 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -30,6 +30,14 @@ int main(int argc, char **argv) { | |||
30 | {0, 0, 0, 0} | 30 | {0, 0, 0, 0} |
31 | }; | 31 | }; |
32 | 32 | ||
33 | const char *usage = | ||
34 | "Usage: swaymsg [options] [message]\n" | ||
35 | "\n" | ||
36 | " -q, --quiet Be quiet.\n" | ||
37 | " -v, --version Show the version number and quit.\n" | ||
38 | " -s, --socket <socket> Use the specified socket.\n" | ||
39 | " -t, --type <type> Specify the message type.\n"; | ||
40 | |||
33 | int c; | 41 | int c; |
34 | while (1) { | 42 | while (1) { |
35 | int option_index = 0; | 43 | int option_index = 0; |
@@ -54,6 +62,9 @@ int main(int argc, char **argv) { | |||
54 | #endif | 62 | #endif |
55 | exit(EXIT_SUCCESS); | 63 | exit(EXIT_SUCCESS); |
56 | break; | 64 | break; |
65 | default: | ||
66 | fprintf(stderr, "%s", usage); | ||
67 | exit(EXIT_FAILURE); | ||
57 | } | 68 | } |
58 | } | 69 | } |
59 | 70 | ||