Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Quote backslash in dobulequote.



is27e1u11% print -lr ${(qqq):-'\'}
"\"
is27e1u11% 

Hm. It should be "\\".

Index: Src/utils.c
===================================================================
RCS file: /projects/zsh/zsh/Src/utils.c,v
retrieving revision 1.1.1.31
diff -u -F^( -r1.1.1.31 utils.c
--- utils.c	1999/09/23 14:15:27	1.1.1.31
+++ utils.c	1999/09/24 12:34:47
@@ -2985,10 +2985,10 @@
 	if (e && *e == u)
 	    *e = v, sf = 1;
 	if (ispecial(*u) &&
-	    (!instring || (isset(BANGHIST) &&
-			   *u == (char)bangchar) ||
+	    (!instring ||
+	     (isset(BANGHIST) && *u == (char)bangchar) ||
 	     (instring == 2 &&
-	      (*u == '$' || *u == '`' || *u == '\"')) ||
+	      (*u == '$' || *u == '`' || *u == '\"' || *u == '\\')) ||
 	     (instring == 1 && *u == '\''))) {
 	    if (*u == '\n' || (instring == 1 && *u == '\'')) {
 		if (unset(RCQUOTES)) {
-- 
Tanaka Akira



Messages sorted by: Reverse Date, Date, Thread, Author