From 7e5a7a91354825cb01cf1f3c26995bcf0c2c27a7 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 8 Sep 2010 12:32:32 +0000 Subject: 28237: new parameter ZLE_LINE_ABORTED 28241: don't list .safe with bindkey -lL --- Src/Zle/zle_keymap.c | 10 ++++++++-- Src/Zle/zle_main.c | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'Src/Zle') 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; -- cgit 1.4.1