about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-02-26 15:41:50 -0500
committerJune McEnroe <june@causal.agency>2022-02-26 15:41:50 -0500
commitb7fe705c9143a8bae6b0e87e62c9568265291484 (patch)
tree1e7ad487aa6def8e013b03449fec2abb6f8ab1ae
parentFactor out commandAvailable (diff)
downloadcatgirl-b7fe705c9143a8bae6b0e87e62c9568265291484.tar.gz
catgirl-b7fe705c9143a8bae6b0e87e62c9568265291484.zip
Only add available commands to complete
-rw-r--r--command.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/command.c b/command.c
index 511bc62..60281d9 100644
--- a/command.c
+++ b/command.c
@@ -692,6 +692,7 @@ void command(uint id, char *input) {
 
 void commandCompleteAdd(void) {
 	for (size_t i = 0; i < ARRAY_LEN(Commands); ++i) {
+		if (!commandAvailable(&Commands[i])) continue;
 		completeAdd(None, Commands[i].cmd, Default);
 	}
 }