From: Zefram <A.Main@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: A tweak of CSH_JUNKIE_QUOTES
Date: Sun, 7 Jan 1996 07:29:37 +0000 (GMT) [thread overview]
Message-ID: <27792.199601070729@stone.dcs.warwick.ac.uk> (raw)
-----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-----
next reply other threads:[~1996-01-07 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-07 7:29 Zefram [this message]
1996-01-08 17:51 ` Zoltan Hidvegi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27792.199601070729@stone.dcs.warwick.ac.uk \
--to=a.main@dcs.warwick.ac.uk \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).