zsh-workers
 help / color / mirror / code / Atom feed
* A tweak of CSH_JUNKIE_QUOTES
@ 1996-01-07  7:29 Zefram
  1996-01-08 17:51 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Zefram @ 1996-01-07  7:29 UTC (permalink / raw)
  To: Z Shell workers mailing list

-----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-----


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A tweak of CSH_JUNKIE_QUOTES
  1996-01-07  7:29 A tweak of CSH_JUNKIE_QUOTES Zefram
@ 1996-01-08 17:51 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1996-01-08 17:51 UTC (permalink / raw)
  To: Zefram; +Cc: zsh-workers

> 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.

Just a note here.  My releases emulate csh correctly in this respect even in
backquoted expressions sine about last march :-).  But that was really the
smallest problem in the baseline lexer.

Cheers,

Zoltan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-01-08 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-01-07  7:29 A tweak of CSH_JUNKIE_QUOTES Zefram
1996-01-08 17:51 ` Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).