zsh-workers
 help / color / mirror / code / Atom feed
From: Martijn Dekker <martijn@inlv.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: 'case' zeroes "$?"
Date: Sun, 9 Oct 2016 23:34:18 +0200	[thread overview]
Message-ID: <1218490b-6132-8d3f-ba98-302dfb19de1a@inlv.org> (raw)
In-Reply-To: <3493e3d3-e578-31d1-27de-06d8d0c35944@inlv.org>

Op 09-10-16 om 23:01 schreef Martijn Dekker:
> Example:
> 
> (exit 37) || case $? in 37) echo "$?";; esac
> 
> All shells except zsh and Busybox ash output 37; zsh outputs 0.

Actually, busybox ash just fixed this as well, see:
https://bugs.busybox.net/show_bug.cgi?id=9311
https://git.kernel.org/cgit/utils/dash/dash.git/commit/?id=da534b740e628512e8e0e62729d6a2ef521e5096

FreeBSD sh, another Almquist derivative, also outputs 37.

Thanks,

- M.


  reply	other threads:[~2016-10-09 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161009210214eucas1p21d253eca777c6b4e9f6e243aa18da25e@eucas1p2.samsung.com>
2016-10-09 21:01 ` Martijn Dekker
2016-10-09 21:34   ` Martijn Dekker [this message]
2016-10-10  8:55   ` Peter Stephenson
2016-10-13  9:30     ` Martijn Dekker

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=1218490b-6132-8d3f-ba98-302dfb19de1a@inlv.org \
    --to=martijn@inlv.org \
    --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).