diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-04-23 23:13:47 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-04-23 23:13:47 +0000 |
commit | 85f25bb845ae50fb1e75edd71c83a63e582abadd (patch) | |
tree | 4250f472e66c239c9043dbbebd94e914bdf76367 /Src/Zle | |
parent | 9b844cfe738ba9dad19d9df3e6ca63e4dba78e61 (diff) | |
download | zsh-85f25bb845ae50fb1e75edd71c83a63e582abadd.tar.gz zsh-85f25bb845ae50fb1e75edd71c83a63e582abadd.tar.xz zsh-85f25bb845ae50fb1e75edd71c83a63e582abadd.zip |
users/10172: new zle command read-command
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; +} |