hirc

IRC client
Log | Files | Refs

commit 837ae8cd7010f1fb7d8f748b75d4f7903263f3ca
parent b6073c33a91a931906e4ca1d0391dce2b5620191
Author: hhvn <dev@hhvn.uk>
Date:   Tue, 12 Apr 2022 17:49:48 +0100

Ignore trailing spaces with /help

Diffstat:
Msrc/commands.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/commands.c b/src/commands.c @@ -1386,6 +1386,7 @@ command_alias) { COMMAND( command_help) { + char *p; int cmdonly = 0; int found = 0; int i, j; @@ -1395,6 +1396,10 @@ command_help) { return; } + p = strrchr(str, ' '); + if (p && *(p+1) == '\0') + *p = '\0'; + if (strcmp(str, "commands") == 0) { hist_format(selected.history, Activity_none, HIST_UI, "SELF_HELP_START :%s", str); for (i=0; commands[i].name && commands[i].func; i++)