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

PATCH: RC_QUOTES



I wrote:
> I've finally discovered why this doesn't work for me.  First, $'...''...'
> is using RCQUOTES to interpolate a ' in the middle.  I suspect this is
> wrong with $'...', since you can quote a single quote in that, but I'll
> take counsel before trying to fix it.

Nobody replied.  Does anyone object to my changing it?  Given the wording
of the option description, I am even more inclined to regard this as a bug,
but I've made it explicit there, too.

Index: Doc/Zsh/options.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v
retrieving revision 1.7
diff -u -r1.7 options.yo
--- Doc/Zsh/options.yo	2000/05/22 07:03:38	1.7
+++ Doc/Zsh/options.yo	2000/05/24 15:26:44
@@ -917,7 +917,9 @@
 cindex(quoting style, rc)
 item(tt(RC_QUOTES))(
 Allow the character sequence `tt('')' to signify a single quote
-within singly quoted strings.
+within singly quoted strings.  Note this does not apply in quoted strings
+using the format tt($')var(...)tt('), where a backslashed single quote can
+be used.
 )
 pindex(RCS)
 cindex(startup files, sourcing)
Index: Src/lex.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/lex.c,v
retrieving revision 1.6
diff -u -r1.6 lex.c
--- Src/lex.c	2000/05/23 08:20:57	1.6
+++ Src/lex.c	2000/05/24 15:26:44
@@ -1190,7 +1190,7 @@
 		    goto brk;
 		}
 		e = hgetc();
-		if (e != '\'' || unset(RCQUOTES))
+		if (e != '\'' || unset(RCQUOTES) || strquote)
 		    break;
 		add(c);
 	    }

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



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