Live data from Hacker News

Moving to zsh (2019)

scriptingosx.com

11–20 of 45 posts

Re: Moving to zsh (2019)

#11

I'm a zsh user, but one thing I miss from bash is /dev/tcp redirection. ~ echo /dev/tcp/google.com/80 ~ echo $? 0 ~ echo /dev/tcp/localhost/80 bash: connect: Network is unreachable bash: /dev/tcp/localhost/80: Network is unreachable ~ echo $? 1

I think that’s Linux-only, right?

Re: Moving to zsh (2019)

#12

I'm a zsh user, but one thing I miss from bash is /dev/tcp redirection. ~ echo /dev/tcp/google.com/80 ~ echo $? 0 ~ echo /dev/tcp/localhost/80 bash: connect: Network is unreachable bash: /dev/tcp/localhost/80: Network is unreachable ~ echo $? 1

Why? There’s nc.

Re: Moving to zsh (2019)

#14
Of course you don’t have to switch, since you can brew install bash 5 or whatever the latest is and then chsh to it, but if you want to use it as an opportunity to change shells, consider checking out some of the newer interactive shells like nushell, elvish, xonsh, oil etc. Some of them are even based on actual general purpose, fairly common programming languages.

Re: Moving to zsh (2019)

#15

Of course you don’t have to switch, since you can brew install bash 5 or whatever the latest is and then chsh to it, but if you want to use it as an opportunity to change shells, consider checking out some of the newer interactive shells like nushell, elvish, xonsh, oil etc. Some of them are even based on actual general purpose, fairly common programming languages.

I really want to try something new but many of those shells are not POSIX compliant enough to be a daily driver and that's kind of a deal breaker. I often run external shell scripts to install various things and the fear that the new shell environment might muck up something I didn't notice is too real. Would have otherwsie moved to fish long ago, so for now it looks like zsh is as good as it gets (unless my concerns are unfounded of course).

Re: Moving to zsh (2019)

#16

First thing I do for any *nix install is immediately install Fish. Like many younger computer users I prefer rainbow barf.

Yeah, I switched to fish about 1.5yrs ago and for me it’s defaults are way better, fish script is way more readable and it’s really easy to customize.

Re: Moving to zsh (2019)

#17
post #15

Of course you don’t have to switch, since you can brew install bash 5 or whatever the latest is and then chsh to it, but if you want to use it as an opportunity to change shells, consider checking out some of the newer interactive shells like nushell, elvish, xonsh, oil etc. Some of them are even based on actual general purpose, fairly common programming languages.

I really want to try something new but many of those shells are not POSIX compliant enough to be a daily driver and that's kind of a deal breaker. I often run external shell scripts to install various things and the fear that the new shell environment might muck up something I didn't notice is too real. Would have otherwsie moved to fish long ago, so for now it looks like zsh is as good as it gets (unless my concerns…

I don't actually think it's that big of an issue. Most of those kinds of scripts should have something like `#!/bin/sh` already to ensure they can be run everywhere and you could always run a specific script in bash/zsh if needed.

Worst case, really, is that many of them do $PATH manipulation, set Env variables for you, or setup autocomplete and you'll need to redo that work in your shell of choice if it doesn't act like bash/zsh (e.g. I think nushell would be the most annoying in this way).

Re: Moving to zsh (2019)

#18
post #7

Bash can do everything zsh can. You just need to know it well enough. There isn't any reason to change default shells to zsh except for licensing concerns by closed-source minded companies.

"Assembly can do everything c++ can. You just need to know it well enough."

Re: Moving to zsh (2019)

#19
A huge reason for my personal time investment in Nix has been to be able to ignore problems like this. I don't want to constantly fear that as I've finally decided to put effort into making things nice for myself for things to change without any recourse.

Re: Moving to zsh (2019)

#20
post #19

A huge reason for my personal time investment in Nix has been to be able to ignore problems like this. I don't want to constantly fear that as I've finally decided to put effort into making things nice for myself for things to change without any recourse.

Luckily, chsh.
Post reply on HN