diff --git a/cli.c b/cli.c index 0477bcf6..300c25de 100644 --- a/cli.c +++ b/cli.c @@ -52,7 +52,7 @@ int cli_usage_args(const int argc, const char *const *args, const struct cli_sch if (matched) { matched_any = 1; for (opt = 0; (word = commands[cmd].words[opt]); ++opt) { - if (word[0] == '\\') + if (word[0] == '|') ++word; xprintf(xpf, " %s", word); } @@ -116,8 +116,8 @@ int cli_parse(const int argc, const char *const *args, const struct cli_schema * * or "wordN", labels it with the matched word (an empty alternative, eg "|word" does not * match an empty argument) * - * (as a result of the above rule, "|word" or "word|" or "|word|" consumes one argument that - * exactly matches "word" and labels it "word") + * (as a special case of the above rule, "|word" consumes one argument that exactly matches + * "word" and labels it "word", but it appears in the help description as "word") * * "