diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2004-09-20 14:03:36 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2004-09-20 14:03:36 +0000 |
commit | 5741e2840f4f905722f453d10a8efcd2486fd9fc (patch) | |
tree | c87a89f1c705470d29172161edc0ca6a685ddd27 /Src/Zle | |
parent | 2e9bbdc833ca50f4d1a4613c1e0f2035fc5f9561 (diff) | |
download | zsh-5741e2840f4f905722f453d10a8efcd2486fd9fc.tar.gz zsh-5741e2840f4f905722f453d10a8efcd2486fd9fc.tar.xz zsh-5741e2840f4f905722f453d10a8efcd2486fd9fc.zip |
20388: tweak ignoreeof behavior on user-defined widgets to match docs.
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/zle_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 2f78db1d1..dbe34a761 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -897,7 +897,13 @@ execzlefunc(Thingy func, char **args) } else if((w = func->widget)->flags & (WIDGET_INT|WIDGET_NCOMP)) { int wflags = w->flags; - if (keybuf[0] == eofchar && !keybuf[1] && + /* + * The rule is that "zle -N" widgets suppress EOF warnings. When + * a "zle -N" widget invokes "zle another-widget" we pass through + * this code again, but with actual arguments rather than with the + * zlenoargs placeholder. + */ + if (keybuf[0] == eofchar && !keybuf[1] && args == zlenoargs && !ll && isfirstln && (zlereadflags & ZLRF_IGNOREEOF)) { showmsg((!islogin) ? "zsh: use 'exit' to exit." : "zsh: use 'logout' to logout."); |