about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-09-08 12:32:32 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-09-08 12:32:32 +0000
commit7e5a7a91354825cb01cf1f3c26995bcf0c2c27a7 (patch)
treee941fcb24ce74dceb1d3c6517e44ffcef5f81721 /Src
parent5ae3e384f52c9d9ef9aecb955deecf236d01bbd9 (diff)
downloadzsh-7e5a7a91354825cb01cf1f3c26995bcf0c2c27a7.tar.gz
zsh-7e5a7a91354825cb01cf1f3c26995bcf0c2c27a7.tar.xz
zsh-7e5a7a91354825cb01cf1f3c26995bcf0c2c27a7.zip
28237: new parameter ZLE_LINE_ABORTED
28241: don't list .safe with bindkey -lL
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_keymap.c10
-rw-r--r--Src/Zle/zle_main.c3
2 files changed, 11 insertions, 2 deletions
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index 8fa8e9883..0531c18ca 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -829,12 +829,18 @@ bin_bindkey_lsmaps(char *name, UNUSED(char *kmname), UNUSED(Keymap km), char **a
 
 /**/
 static void
-scanlistmaps(HashNode hn, int list)
+scanlistmaps(HashNode hn, int list_verbose)
 {
     KeymapName n = (KeymapName) hn;
 
-    if (list) {
+    if (list_verbose) {
 	Keymap km = n->keymap;
+	/*
+	 * Don't list ".safe" as a bindkey command; we can't
+	 * actually create it that way.
+	 */
+	if (!strcmp(n->nam, ".safe"))
+	    return;
 	fputs("bindkey -", stdout);
 	if (km->primary && km->primary != n) {
 	    KeymapName pn = km->primary;
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 5c6b65db3..641880ccf 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1226,6 +1226,9 @@ zleread(char **lp, char **rp, int flags, int context)
 
     zlecore();
 
+    if (errflag)
+	setsparam("ZLE_LINE_ABORTED", zlegetline(NULL, NULL));
+
     if (done && !exit_pending && !errflag &&
 	(initthingy = rthingy_nocreate("zle-line-finish"))) {
 	int saverrflag = errflag;