From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5055 invoked from network); 17 Nov 2020 16:14:09 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Nov 2020 16:14:09 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1605629649; b=YoazQQ+2vy+CrW2iVZnyHUmFJFP2odv1M1BqNPwtdPitsEogO8GENISekmdA7lX6vAl6XVr/qL FCP38C/vlKl+VWtowPYYipjL1D5O/fBrpX7A8tBt7d5yZgFnXdRpb6O2eZsdCHR6zyrR/n97sM xRoD8dBcKjw3hT84wKIfjVP/Zo9ewV/GcoIZAVTHVXhHlN7GcZP2qUsgsvdEilrFLp0vNywO0L B5MDf+d8S5HrdOlIHwL/Tm2BaYbyoh8OPjI3FtAplZ6wv/fAqFLc3wOR3fRoq1cU6TQFMCCxeF kWhco5KGiTrP8ELfrXQaLXeekUuo3ZxkG0hZuSbXStMUQg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-40133.protonmail.ch) smtp.remote-ip=185.70.40.133; dkim=pass header.d=reichardt.de header.s=protonmail header.a=rsa-sha256; dmarc=pass header.from=reichardt.de; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1605629649; bh=X51Grf7IPI51jU+YjE8+BgbM8YUob0xiQh6lODCQPbg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Subject:Reply-To:From:To:DKIM-Signature: Date:DKIM-Signature; b=mOEdWFQ4dt38OqnMu9oTePfLVhK26ccIC488cfHqoqlKC2SMUwEjJgPjv7v7NQnflmYtkvjJWp eOww94QAQlOnEUEy4jiiHRiXx1B0v7fwv3XVnQqY/o5yS62clRetzwNJ/1S/IPoRnsZC2V3qiM F7fWjlJW7hrCCneDCCx4TpIVY7r/aUyc/KCc1jBJ3dejjbZ/WzSkQsmsxAK8nO/RgqxghGbduc twTWGdeC2TnO+TE7n5x7WdPDfU1B97cgwQuLNTDbcIYeKaT1lBXzKu/s6TxsgNAiIw2IdzfnUa Li7nWIpPGAeHcZiPvuixwf9a8h2uKObzyaLfP4au042pLA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Reply-To: From:To:Date:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=X51Grf7IPI51jU+YjE8+BgbM8YUob0xiQh6lODCQPbg=; b=Q/yrQ3SANxQC6QfB+cEsWilo2M 3LXw8mW4J6N+Xh4aTLSTwumhr5SfQ0tNwfr/Ups/tv0jgd8ZlrLCCuOyX1pbQRS4JmN5bGnTWbRWn hO7p1/FH19Rmn4P66aR9zaXYFfvqAyVgNt6KC4IUks2uuzFl+tDx9kXLXNg9cgKPXRTh9CdV0nGQf y6ADds+g0jZkXDSvs/M2JHFGboNq4cWxtjiguUxcIpfMtCq6l6okD+CpIPo2uLreoTx+BFf51nPHT DUUCpvEjYGojlFohDOjs+8IVvEw07I40ZH5R9ceENOLY3mbdhf7Gdzs5lNmTHKQDCkBfiizwY0D0v oUVd0oYg==; Received: from authenticated user by zero.zsh.org with local id 1kf3cN-0000Pr-Il; Tue, 17 Nov 2020 16:14:07 +0000 Authentication-Results: zsh.org; iprev=pass (mail-40133.protonmail.ch) smtp.remote-ip=185.70.40.133; dkim=pass header.d=reichardt.de header.s=protonmail header.a=rsa-sha256; dmarc=pass header.from=reichardt.de; arc=none Received: from mail-40133.protonmail.ch ([185.70.40.133]:24605) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1kf3bx-00003S-GC; Tue, 17 Nov 2020 16:13:41 +0000 Date: Tue, 17 Nov 2020 16:13:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reichardt.de; s=protonmail; t=1605629620; bh=X51Grf7IPI51jU+YjE8+BgbM8YUob0xiQh6lODCQPbg=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=IVlW4RTJE3wGb0k4y0YRxErSx+4Q1tOeoGwxxLUK5ujZVD4TpL+mUQ6NH42zrIwXv kwVP5BUDC/NSJC1jjTm82akS6sNKllJuqLHya3oeTHayTeLPIBzcZ+AEGzRFGkIFiz lf2xHEfoc5Iu/Kxtn5EmshdHzR+G8fFKUouodgP8= To: Zsh Users From: Dominik Reichardt Reply-To: Dominik Reichardt Subject: Re: Apple bash to zsh script problems with error control and bash emulation Message-ID: <26ED4B54-363A-4A03-993D-AB447E062E2A@reichardt.de> In-Reply-To: <400E3641-0265-4DBC-98A3-D9E4A1E41164@covisp.net> References: <1EFC2452-32D1-411C-B239-0031131FA197@gmail.com> <20201116180129.4f6a851f@tarpaulin.shahaf.local2> <4254F6E5-249B-4DFF-8D4D-6D253D15AFB2@gmail.com> <5F28C80F-1AAB-4DBB-8B65-6544F66C3CED@gmail.com> <400E3641-0265-4DBC-98A3-D9E4A1E41164@covisp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 26182 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: > On 17. Nov 2020, at 16:54, Lewis Butler wrote: >=20 >=20 > On 17 Nov 2020, at 06:03, Dominik Reichardt wrote: >> On 16. Nov 2020, at 21:11, Roman Perepelitsa wrote: >>> On Mon, Nov 16, 2020 at 8:46 PM Dominik Reichardt w= rote: >>>> So now the script runs as expected again without bash emulation! Wheee= ! >=20 >>> It no longer works with bash though. >=20 >> I=E2=80=99m good with that. I needed the script to work on my machines t= hat are now all switched to zsh shell. >=20 > This statement seems to me to have a underlying assumption that is entire= ly wrong. >=20 > Bash did not go away and bash will not go away. The shell you use interac= tively has nothing to do with the shell a script invokes. >=20 > There is no reason to change a working script from bash to zsh just becau= se the interactive shell you use has changed. >=20 > There may be other reasons to change a script for new features or better = behavior (For example, I converted many sh scripts to bash because of these= types of issues, but I also still have plenty of sh scripts as well). Let me rephrase it: I switched my interactive shell to zsh on all my machines.=20 My script did no longer work correctly even though the script invoked bash = (Apple=E2=80=99s old bash). My script did not work correctly when I changed it to invoke zsh with bash = emulation. My script did work correctly after I changed ti to invoke zsh without bash = emulation and some fixes to make it work. So now I am happy that my script works on all my machines. And from that li= st, I think it is clear that it was not working at least not with Apple= =E2=80=99s bash and whatever they did to make it work less than it did befo= re I switched to zsh. My goal was that I can use the script on a new machin= e without having to install a proper bash first. And that goal is met, so t= hank you for your input and that you are willing to help. Dom