Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: parse vs. runtime errors
- X-seq: zsh-users 23358
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: Re: parse vs. runtime errors
- Date: Fri, 20 Apr 2018 19:00:34 +0000
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u4uUZEDuT3OAkJgJXvMTDzlStWyD17dG//GDANNRki8=; b=NuXoukhfnpH4Ci0VBYTBCRxfOm41b3ByKJzSyM0r3QnWGBko1zFwL47sbqbXQnCQ8K Mtd/QOuFKdCDECoBLXVFfuMKKJHoJHdDLO4QtSXuGaKlf5JKdb8FjTYw42zGAk2dQQux 7w1583VBrN/oDV03rQ+p5skll3PurhLxboecbn5iZYvd2BQOR52nKtF/eT5dHOnJ/vff OBeEovfamZzhxmjq+qX/NB6zWWmYhyr97veyL3WqzC8GGZYCfyU170VdZhCLaros11Lz BmeDdIAWqo3JxU4nAZsmgSABShe/pAtB84Fl31Xw1XdxsR+O6Y493UUYx9GGq00PlSGh yXVA==
- In-reply-to: <f3dc8071-cc88-ed6f-52a0-469fd7f6b32a@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <f3dc8071-cc88-ed6f-52a0-469fd7f6b32a@eastlink.ca>
On Fri, Apr 20, 2018, 11:31 AM Ray Andrews <rayandrews@xxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author