about summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--command.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/command.c b/command.c
index b345e11..84cb68f 100644
--- a/command.c
+++ b/command.c
@@ -379,7 +379,17 @@ static void commandWindow(uint id, char *params) {
 		uiShowNum(strtoul(params, NULL, 10));
 	} else {
 		id = idFind(params);
-		if (id) uiShowID(id);
+		if (id) {
+			uiShowID(id);
+			return;
+		}
+		for (const char *match; (match = completeSubstr(None, params));) {
+			id = idFind(match);
+			if (!id) continue;
+			completeAccept();
+			uiShowID(id);
+			break;
+		}
 	}
 }