Add /clear autocompletion and improve help

Regards https://github.com/profanity-im/profanity/issues/855

https://github.com/profanity-im/profanity/pull/874 brought us the
`/clear` command. The author of that patch couldn't follow up with the
review boothj5 did.

So the autocompletion and updated help was missing.
This commit adds it.
This commit is contained in:
Michael Vetter
2019-10-05 16:19:53 +02:00
parent d7c00360ea
commit 684a9b1a56
3 changed files with 60 additions and 6 deletions

View File

@@ -1107,17 +1107,23 @@ static struct cmd_t command_defs[] =
},
{ "/clear",
parse_args, 0, 0, NULL,
parse_args, 0, 2, NULL,
CMD_NOSUBFUNCS
CMD_MAINFUNC(cmd_clear)
CMD_TAGS(
CMD_TAG_UI)
CMD_SYN(
"/clear")
"/clear",
"/clear persist_history <on|off>")
CMD_DESC(
"Clear the current window.")
CMD_NOARGS
CMD_NOEXAMPLES
"Clear the current window. "
"If you set persist_history you can still access the history by pressing PAGE UP.")
CMD_ARGS(
{ "persist_history on|off", "Whether or not to clear the screen persistently"})
CMD_EXAMPLES(
"/clear",
"/clear persist_history",
"/clear persist_history on")
},
{ "/quit",