about summary refs log tree commit diff
path: root/complete.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--complete.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/complete.c b/complete.c
index 5835926..ead2457 100644
--- a/complete.c
+++ b/complete.c
@@ -119,6 +119,15 @@ const char *complete(uint id, const char *prefix) {
 	return NULL;
 }
 
+const char *completeSubstr(uint id, const char *substr) {
+	for (match = (match ? match->next : head); match; match = match->next) {
+		if (match->id && match->id != id) continue;
+		if (!strcasestr(match->str, substr)) continue;
+		return match->str;
+	}
+	return NULL;
+}
+
 void completeAccept(void) {
 	if (match) prepend(detach(match));
 	match = NULL;
14:45:39 -0400'>2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe