summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_thingy.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-11-04 14:14:26 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-11-04 14:14:26 +0000
commit45faf8f5b2758a638e0958928262ca9d26980885 (patch)
treef8ce41f5256066c0badafad6a561218007dc5804 /Src/Zle/zle_thingy.c
parentfdb00982f5405a869392e0dfea6a76e044af212a (diff)
downloadzsh-45faf8f5b2758a638e0958928262ca9d26980885.tar.gz
zsh-45faf8f5b2758a638e0958928262ca9d26980885.zip
29891: make zle -lL with arguments work
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r--Src/Zle/zle_thingy.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index f712e1750..03e73b4ca 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -394,9 +394,13 @@ bin_zle_list(UNUSED(char *name), char **args, Options ops, UNUSED(char func))
Thingy t;
for (; *args && !ret; args++) {
- if (!(t = (Thingy) thingytab->getnode2(thingytab, *args)) ||
+ HashNode hn = thingytab->getnode2(thingytab, *args);
+ if (!(t = (Thingy) hn) ||
(!OPT_ISSET(ops,'a') && (t->widget->flags & WIDGET_INT)))
ret = 1;
+ else if (OPT_ISSET(ops,'L')) {
+ scanlistwidgets(hn, 1);
+ }
}
return ret;
}
@@ -483,6 +487,12 @@ bin_zle_keymap(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
return selectkeymap(*args, 0);
}
+/*
+ * List a widget.
+ * If list is negative, just print the name.
+ * If list is 0, use abbreviated format.
+ * If list is positive, output as a command.
+ */
/**/
static void
scanlistwidgets(HashNode hn, int list)