about summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan <okan>2012-11-07 14:39:44 +0000
committerokan <okan>2012-11-07 14:39:44 +0000
commit4b84287d1935144625bd506facbf56e8470ce5be (patch)
tree45eb44692584068d48048d73233c88badb846f3f /kbfunc.c
parentdabc05034f56a14fb85e7b448b489f52a60ee600 (diff)
downloadcwm-4b84287d1935144625bd506facbf56e8470ce5be.tar.gz
cwm-4b84287d1935144625bd506facbf56e8470ce5be.tar.xz
cwm-4b84287d1935144625bd506facbf56e8470ce5be.zip
tab completion support for menus; from Alexander Polakov.
ok sthen@ on an older incarnation
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kbfunc.c b/kbfunc.c
index e11a3cb..1920c5d 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -298,8 +298,9 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg)
 	}
 	xfree(path);
 
-	if ((mi = menu_filter(sc, &menuq, label, NULL, 1,
-	    search_match_exec, NULL)) != NULL) {
+	if ((mi = menu_filter(sc, &menuq, label, NULL,
+	    CWM_MENU_DUMMY | CWM_MENU_FILE,
+	    search_match_exec_path, NULL)) != NULL) {
 		if (mi->text[0] == '\0')
 			goto out;
 		switch (cmd) {
@@ -376,7 +377,7 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg)
 	xfree(lbuf);
 	(void)fclose(fp);
 
-	if ((mi = menu_filter(sc, &menuq, "ssh", NULL, 1,
+	if ((mi = menu_filter(sc, &menuq, "ssh", NULL, CWM_MENU_DUMMY,
 	    search_match_exec, NULL)) != NULL) {
 		if (mi->text[0] == '\0')
 			goto out;
@@ -403,7 +404,7 @@ kbfunc_client_label(struct client_ctx *cc, union arg *arg)
 	TAILQ_INIT(&menuq);
 
 	/* dummy is set, so this will always return */
-	mi = menu_filter(cc->sc, &menuq, "label", cc->label, 1,
+	mi = menu_filter(cc->sc, &menuq, "label", cc->label, CWM_MENU_DUMMY,
 	    search_match_text, NULL);
 
 	if (!mi->abort) {