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

A tweak of CSH_JUNKIE_QUOTES



-----BEGIN PGP SIGNED MESSAGE-----

The patch below makes a slight `improvement' to the CSH_JUNKIE_QUOTES
option.  In order to emulate csh more accurately, this patch makes the
option prevent \ from quoting anything except a newline inside double
quotes.  This makes zsh emulate csh behaviour fully w.r.t. single and
double quotes.  Behaviour in backquoted expressions is still different,
but I suspect that that would be just too awkward to emulate fully.
This change is very simple.

 -zefram

      *** 1.1	1995/12/23 17:39:23
      --- Src/lex.c	1996/01/07 06:59:20
      ***************
      *** 788,794 ****
        	    intick = 0;
        	    while (((c = hgetc()) != endchar || (dbparens && pct > 0) ||
        		    intick) && !lexstop)
      ! 		if (c == '\\') {
        		    c = hgetc();
        		    if (c != '\n') {
        			add(c == '$' || c == '\\' ||
      --- 788,794 ----
        	    intick = 0;
        	    while (((c = hgetc()) != endchar || (dbparens && pct > 0) ||
        		    intick) && !lexstop)
      ! 		if (c == '\\' && unset(CSHJUNKIEQUOTES)) {
        		    c = hgetc();
        		    if (c != '\n') {
        			add(c == '$' || c == '\\' ||
      *** 1.1	1995/12/23 17:35:38
      --- Doc/zshoptions.man	1996/01/07 07:13:02
      ***************
      *** 121,126 ****
      --- 121,132 ----
        \fBCSH_JUNKIE_QUOTES\fP
        Complain if a quoted expression runs off the end of a line;
        prevent quoted expressions from containing unescaped newlines.
      + (A backslash immediately preceding a newline in quotes escapes the newline.)
      + Also prevent backslash escaping anything other than newline in double quotes.
      + (Normally it would escape `\fB\e\fP', `\fB"\fP', `\fB$\fP' and `\fB`\fP'.)
      + This approximates
      + .IR csh (1)'s
      + quoting rules.
        .TP
        \fBCSH_NULL_GLOB\fP
        If a pattern for filename generation has no matches,

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQCVAgUBMO92G3D/+HJTpU/hAQFodgP/TLbkN+1dLRaHoOoLaoD/hJope8OZLMeT
5ISKrhs+33ggBo7B8Igz/0QrU4NSlq3sNeHz29eOJpvPdrZMaSbBSU7IjlsX5Ru+
53stGxLeU5RJNQ1hGjX0OmintVoTqN9hPvXgIRlbw1JQgrI0gVsF6f641Z4H3t9f
OvhPzHgt4D4=
=qXeO
-----END PGP SIGNATURE-----



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