Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `=' expansion causes script/subshell to exit, bug?
- X-seq: zsh-workers 43576
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: `=' expansion causes script/subshell to exit, bug?
- Date: Thu, 27 Sep 2018 13:33:53 -0700
- Cc: beelzebubbie.logs@xxxxxxxxx
- 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:content-transfer-encoding; bh=S27530X1aMXbvDdM3AAKu8gO9GCwxvVId9hN/do2BQQ=; b=A7Y0FISJCD8uK2ZttZsf0ALlGFm+YB7dESsOZBM47T6g6bSSh00NlOPPzqjOluQ2zP dnfvHgG1JXlzVQkn+ZtutbQ0w8PmWoSiafMnWu0GsOHyrkS6maUjHUl5hDwZfTsdmicz iZ6pcGvhpajdTN1t3wTMDkRV6yAaWcP/xAkqgVS52AeWrYNMh6EGZO2Ol266c31LvXgA a2DEFUcEN6nukVna7CzQr7TI3WkwbCWb9WoqtX++hL+jPHn+R6CoAhXCTY5J7HhY98K1 56mB25vuAdlugydwO+7S+/qE6vOsk5/IkJIkksEBpnWYHRojWyaEyyiZNfdLma3o02Qz YRbw==
- In-reply-to: <647E0B88-B2E9-4337-B3CA-439093B02C17@dana.is>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <16141d86-9d3e-275f-f7b4-d8b07fc97aa7@gmail.com> <647E0B88-B2E9-4337-B3CA-439093B02C17@dana.is>
On Thu, Sep 27, 2018 at 12:41 PM dana <dana@xxxxxxx> wrote:
>
> If a pattern for filename generation has no matches, print an error, instead
> of leaving it unchanged in the argument list. This also applies to file
> expansion of an initial ‘~’ or ‘=’.
>
> The documentation could probably be more explicit — it doesn't just print an
> error, it also aborts the current command (and apparently the following ones; i
> didn't even realise that).
This is more fully described in the "Errors" section of the manual (see
http://zsh.sourceforge.net/Doc/Release/Shell-Grammar.html#Errors
"Certain errors are treated as fatal by the shell: in an interactive
shell, they cause control to return to the command line, and in a
non-interactive shell they cause the shell to be aborted.")
In particular it lists:
* File generation errors where not caught by the option BAD_PATTERN
* File generation failures where not caused by NO_MATCH or similar options
I'm a little puzzled by the "not" in that second one because this
clearly does cause an abort on a non-match. Maybe it means "where not
caught by"? Of course the first one is also sort of backward, it
should probably say "NO_BAD_PATTERN" or make reference to "unsetopt
BAD_PATTERN".
> You can disable it by setting either no_nomatch or null_glob
null_glob has no effect on this for me. I think you must have
accidentally had both nonomatch and nullglob set.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author