Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Builtin exit from inside ZLE widget
On Sep 3, 5:00am, Mikael Magnusson wrote:
}
} % bindkey 0 e
} % e() exit
} % zle -N e
} % '
} quote> 0
}
} this prints the PS2 prompt indefinitely, ctrl-c is ignored and so is a
} normal kill, I have to kill -9 from another shell to stop it.
This seems to be it:
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index e610ae1..ec3d2c3 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1276,7 +1276,7 @@ zleread(char **lp, char **rp, int flags, int context, char *init, char *finish)
alarm(0);
freeundo();
- if (eofsent || errflag) {
+ if (eofsent || errflag || exit_pending) {
s = NULL;
} else {
zleline[zlell++] = ZWC('\n');
There will be a final "unmatched '" reported in Mikael's specific example,
but quashing that is an exercise that can wait.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author