From 5cce599495b348af4acf69be3af4914d5cba7672 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 2 Jun 2026 00:14:40 +0200 Subject: 54672: use bangchar instead of this hardcoded ! --- ChangeLog | 3 +++ Src/Zle/zle_tricky.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 846c34cfa..7478982b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2026-06-07 Mikael Magnusson + * 54672: Src/Zle/zle_tricky.c: use bangchar instead of this + hardcoded ! + * 54671: Src/glob.c, Test/D04parameter.ztst: fix anchored pattern with --disable-multibyte diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index a1aa9b35f..e358cda3e 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1771,9 +1771,9 @@ get_comp_string(void) * \! in double quotes is extracted by the history code before normal * parsing, so sanitize it here, too. */ - if (instring == QT_DOUBLE) { + if (instring == QT_DOUBLE && isset(BANGHIST) && bangchar) { for (q = s; *q; q++) - if (*q == '\\' && q[1] == '!') + if (*q == '\\' && (unsigned char)q[1] == bangchar) *q = Bnull; } } -- cgit v1.3.1