diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-04-25 10:10:49 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-04-25 10:10:49 +0000 |
commit | a2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e (patch) | |
tree | 3bb9673cdc8e202730e806b68a6b6fde89091401 /Src/Zle | |
parent | 85f25bb845ae50fb1e75edd71c83a63e582abadd (diff) | |
download | zsh-a2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e.tar.gz zsh-a2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e.tar.xz zsh-a2d5ebe3c017a3f34ce2ead69110b08c2eeeb67e.zip |
22427: zle <widget> -w sets the environment for <widget>
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/zle_thingy.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index c0c8622b2..209949df2 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -639,9 +639,9 @@ zle_usable() static int bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) { - Thingy t; + Thingy t, savbindk = bindk; struct modifier modsave = zmod; - int ret, saveflag = 0; + int ret, saveflag = 0, setbindk = 0; char *wname = *args++, *keymap_restore = NULL, *keymap_tmp; if (!wname) @@ -692,6 +692,9 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) if (selectkeymap(keymap_tmp, 0)) return 1; break; + case 'w': + setbindk = 1; + break; default: zwarnnam(name, "unknown option: %s", *args, 0); return 1; @@ -701,7 +704,10 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func)) } t = rthingy(wname); + if (setbindk) + bindk = t; ret = execzlefunc(t, args); + bindk = savbindk; unrefthingy(t); if (saveflag) zmod = modsave; |