about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-09 17:49:31 -0400
committerJune McEnroe <june@causal.agency>2018-08-09 17:49:31 -0400
commitdbdf13b51abe725b37c58b8fb87b2d58b64663af (patch)
tree7021d24521c3dd7b82da83c734c0cf6af7d7100f
parentReplace shift with a great variadic function (diff)
downloadcatgirl-dbdf13b51abe725b37c58b8fb87b2d58b64663af.tar.gz
catgirl-dbdf13b51abe725b37c58b8fb87b2d58b64663af.zip
Ignore trailing space on slash commands
-rw-r--r--input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/input.c b/input.c
index 64102e2..c342a78 100644
--- a/input.c
+++ b/input.c
@@ -109,6 +109,7 @@ void input(char *input) {
 		return;
 	}
 	char *command = strsep(&input, " ");
+	if (input && !input[0]) input = NULL;
 	for (size_t i = 0; i < COMMANDS_LEN; ++i) {
 		if (strcasecmp(command, COMMANDS[i].command)) continue;
 		COMMANDS[i].handler(input);
to hiJune McEnroe 2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe 2019-02-17Always split spans after newlinesJune McEnroe 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe