diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2012-11-08 16:50:38 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2012-11-08 16:50:38 +0000 |
commit | cba5449c3d4d140af05b7a6d726afbbab2f55f31 (patch) | |
tree | 2065e1934fd473c0ca0a2f2e50521ab1aaeeed73 /Src | |
parent | 64e925bd65888856f365de45542b0c0eea25af2e (diff) | |
download | zsh-cba5449c3d4d140af05b7a6d726afbbab2f55f31.tar.gz zsh-cba5449c3d4d140af05b7a6d726afbbab2f55f31.tar.xz zsh-cba5449c3d4d140af05b7a6d726afbbab2f55f31.zip |
30786: do not enter interactive history editing or command execution if
"fc" is called from a ZLE widget.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/builtin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 8a83df711..90fe1a6c5 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1414,6 +1414,12 @@ bin_fc(char *nam, char **argv, Options ops, int func) unqueue_signals(); return 0; } + + if (zleactive) { + zwarnnam(nam, "no interactive history within ZLE"); + return 1; + } + /* put foo=bar type arguments into the substitution list */ while (*argv && equalsplit(*argv, &s)) { Asgment a = (Asgment) zhalloc(sizeof *a); |