From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with ESMTP id SAA17177 for ; Sun, 7 Jan 1996 18:55:56 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id CAA16546; Sun, 7 Jan 1996 02:29:28 -0500 (EST) Resent-Date: Sun, 7 Jan 1996 02:29:28 -0500 (EST) From: Zefram Message-Id: <27792.199601070729@stone.dcs.warwick.ac.uk> Subject: A tweak of CSH_JUNKIE_QUOTES To: zsh-workers@math.gatech.edu (Z Shell workers mailing list) Date: Sun, 7 Jan 1996 07:29:37 +0000 (GMT) X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]6861.56 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"8DVa5.0.P24.NPtxm"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/718 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----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-----