From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: parse vs. runtime errors
Date: Fri, 20 Apr 2018 19:00:34 +0000 [thread overview]
Message-ID: <CAH+w=7Y2HTXN13EWgZGBmPjtUJo8caxOov2PzpY51NvrLOUMjg@mail.gmail.com> (raw)
In-Reply-To: <f3dc8071-cc88-ed6f-52a0-469fd7f6b32a@eastlink.ca>
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
On Fri, Apr 20, 2018, 11:31 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
> How come:
>
> [ .... ]]
>
> is only caught as an error at runtime?
"[" is a command (synonym for "test") and not a token, and "]]" is only a
token when balanced with "[[".
The error kills anything
> remaining on the same line
That would depend on how the remaining commands are separated from this one.
Either way, can I ask zsh to always make any error stop everything and
> make itself known?
That's what "setopt errexit" is for, although that mostly applies to
scripts rather than interactive shells.
next prev parent reply other threads:[~2018-04-20 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 18:00 Ray Andrews
2018-04-20 19:00 ` Bart Schaefer [this message]
2018-04-21 1:48 ` Ray Andrews
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='CAH+w=7Y2HTXN13EWgZGBmPjtUJo8caxOov2PzpY51NvrLOUMjg@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=rayandrews@eastlink.ca \
--cc=zsh-users@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).