PATCH: use bangchar instead of this hardcoded !

Mikael Magnusson <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.