summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/nxt_runtime.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c
index e48f8b58..b581209d 100644
--- a/src/nxt_runtime.c
+++ b/src/nxt_runtime.c
@@ -990,7 +990,7 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
exit(0);
}
- if (nxt_strcmp(p, "--help") == 0) {
+ if (nxt_strcmp(p, "--help") == 0 || nxt_strcmp(p, "-h") == 0) {
write(STDOUT_FILENO, help, sizeof(help) - 1);
if (sizeof(NXT_GROUP) == 1) {
@@ -1003,7 +1003,10 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
exit(0);
}
- end = nxt_sprintf(buf, buf + sizeof(buf), "unknown option \"%s\"\n", p);
+ end = nxt_sprintf(buf, buf + sizeof(buf), "unknown option \"%s\", "
+ "try \"%s -h\" for available options\n",
+ p, nxt_process_argv[0]);
+
write(STDERR_FILENO, buf, end - buf);
return NXT_ERROR;