diff options
-rw-r--r-- | sway/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c index 60a41923..7b24d405 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -65,6 +65,18 @@ int main(int argc, char **argv) { | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | char *config_path = NULL; | 67 | char *config_path = NULL; |
68 | |||
69 | const char* usage = | ||
70 | "Usage: sway [options] [command]\n" | ||
71 | "\n" | ||
72 | " -c, --config <config> Specify a config file.\n" | ||
73 | " -C, --validate Check the validity of the config file, then exit.\n" | ||
74 | " -d, --debug Enables full logging, including debug information.\n" | ||
75 | " -v, --version Show the version number and quit.\n" | ||
76 | " -V, --verbose Enables more verbose logging.\n" | ||
77 | " --get-socketpath Gets the IPC socket path and prints it, then exits.\n" | ||
78 | "\n"; | ||
79 | |||
68 | int c; | 80 | int c; |
69 | while (1) { | 81 | while (1) { |
70 | int option_index = 0; | 82 | int option_index = 0; |
@@ -104,6 +116,9 @@ int main(int argc, char **argv) { | |||
104 | exit(EXIT_FAILURE); | 116 | exit(EXIT_FAILURE); |
105 | } | 117 | } |
106 | break; | 118 | break; |
119 | default: | ||
120 | fprintf(stderr, "%s", usage); | ||
121 | exit(EXIT_FAILURE); | ||
107 | } | 122 | } |
108 | } | 123 | } |
109 | 124 | ||