diff options
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/iwidgets.list | 1 | ||||
-rw-r--r-- | Src/Zle/zle_keymap.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Src/Zle/iwidgets.list b/Src/Zle/iwidgets.list index cc9ef20f9..5be5a474f 100644 --- a/Src/Zle/iwidgets.list +++ b/Src/Zle/iwidgets.list @@ -86,6 +86,7 @@ "quoted-insert", quotedinsert, ZLE_MENUCMP | ZLE_KEEPSUFFIX "quote-line", quoteline, 0 "quote-region", quoteregion, 0 +"read-command", readcommand, 0 "recursive-edit", recursiveedit, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_LASTCOL "redisplay", redisplay, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_LASTCOL "redo", redo, ZLE_KEEPSUFFIX diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c index 7b1f9e1ad..1d5e6ed2d 100644 --- a/Src/Zle/zle_keymap.c +++ b/Src/Zle/zle_keymap.c @@ -1441,3 +1441,16 @@ zlesetkeymap(int mode) return; linkkeymap(km, "main", 0); } + +/**/ +mod_export int +readcommand(UNUSED(char **args)) +{ + Thingy thingy = getkeycmd(); + + if (!thingy) + return 1; + + setsparam("REPLY", ztrdup(thingy->nam)); + return 0; +} |