From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: ${(z)} split of unmatched, doubled ((
Date: Sun, 27 Sep 2015 20:30:33 -0700 [thread overview]
Message-ID: <150927203033.ZM20640@torch.brasslantern.com> (raw)
In-Reply-To: <20150928015531.GF1879@tarsus.local2>
On Sep 28, 1:55am, Daniel Shahaf wrote:
}
} If we can't prove that tokstr is always
} non-NULL, I would vote to test it for NULL before using it.
OK, I'm going to commit it like this;
diff --git a/Src/lex.c b/Src/lex.c
index 70f3d14..89af961 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -783,6 +783,15 @@ gettok(void)
*/
tokstr = NULL;
return INPAR;
+
+ case CMD_OR_MATH_ERR:
+ /*
+ * LEXFLAGS_ACTIVE means we came from bufferwords(),
+ * so we treat as an incomplete math expression
+ */
+ if (lexflags & LEXFLAGS_ACTIVE)
+ tokstr = dyncat("((", tokstr ? tokstr : "");
+ /* fall through */
default:
return LEXERR;
prev parent reply other threads:[~2015-09-28 3:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-27 1:23 Daniel Shahaf
2015-09-27 16:00 ` Bart Schaefer
2015-09-27 23:51 ` Daniel Shahaf
2015-09-28 0:59 ` Bart Schaefer
2015-09-28 1:55 ` Daniel Shahaf
2015-09-28 3:30 ` Bart Schaefer [this message]
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=150927203033.ZM20640@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/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).