Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with "return" from inside "if"
- X-seq: zsh-workers 39841
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug with "return" from inside "if"
- Date: Sat, 5 Nov 2016 14:00:43 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=48wjr9mMc3AzU3DwgJ82ziSqXMKP37MvPcgAXBelfu0=; b=OdDhbv2X7MZFoKAuBJ74BzfGNxBjRi9HS+WNNhDqRtN7julb6/vL+eyptbDbHB6E3h v8wHJqcnJTOCuoWSjFrNGDP+MixhOPhv7V8OHajL0OW50izaxiUPDruQ9/vKKrIoAlJ1 zehfKtGWJA8YgclbPhBcI/q4jwgomdD9mN1aJ+wJFxMLQomR6PO1gjCZk4Hb+Pa40nyT M5ryYtvMjBji8qPUKfgENl1QshX1TxeQsTFkb4DA4UUrTmdGPOSuDIUW0lVXdNx0buVd 0QxLze7MoTOWxvVr90HtjGKibH0v8PqR0xF5XYVvEgwuG6c+7hYdzkGEpL1UGvJWmTKu msmw==
- In-reply-to: <161105132509.ZM17198@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <161105132509.ZM17198@torch.brasslantern.com>
On Nov 5, 1:25pm, Bart Schaefer wrote:
} Subject: Bug with "return" from inside "if"
}
} % () { if return 1; then echo yes; else echo no; fi } && echo $?
} 0
Incidentally:
whatsupwithwhile () {
while return 1
do ;
done
}
Both dash and zsh return an exit status of zero from whatsupwithwhile;
bash returns 1.
The change for this, if desirable, is less obvious than with execif(),
so I haven't dug into it yet.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author