Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Apple bash to zsh script problems with error control and bash emulation
> On 17. Nov 2020, at 16:54, Lewis Butler <lbutler@xxxxxxxxxx> wrote:
>
>
> On 17 Nov 2020, at 06:03, Dominik Reichardt <domiman@xxxxxxxxx> wrote:
>> On 16. Nov 2020, at 21:11, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
>>> On Mon, Nov 16, 2020 at 8:46 PM Dominik Reichardt <domiman@xxxxxxxxx> wrote:
>>>> So now the script runs as expected again without bash emulation! Wheee!
>
>>> It no longer works with bash though.
>
>> I’m good with that. I needed the script to work on my machines that are now all switched to zsh shell.
>
> This statement seems to me to have a underlying assumption that is entirely wrong.
>
> Bash did not go away and bash will not go away. The shell you use interactively has nothing to do with the shell a script invokes.
>
> There is no reason to change a working script from bash to zsh just because the interactive shell you use has changed.
>
> 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.
My script did no longer work correctly even though the script invoked bash (Apple’s 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 list, I think it is clear that it was not working at least not with Apple’s bash and whatever they did to make it work less than it did before I switched to zsh. My goal was that I can use the script on a new machine without having to install a proper bash first. And that goal is met, so thank you for your input and that you are willing to help.
Dom
Messages sorted by:
Reverse Date,
Date,
Thread,
Author