Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: use bangchar instead of this hardcoded !
- X-seq: zsh-workers 54672
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: use bangchar instead of this hardcoded !
- Date: Thu, 4 Jun 2026 07:31:37 +0200
- Archived-at: <https://zsh.org/workers/54672>
- List-id: <zsh-workers.zsh.org>
---
Src/Zle/zle_tricky.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index a1aa9b35f3..e358cda3e0 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;
}
}
--
2.38.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author