Return to Level1Techs.com

Who uses zsh?

linux
bsd
macos
#1

Apple is changing the default shell in macOS to zsh. I administer many Macs and have little experience with zsh. However, on paper, I really like zsh. The license and features all look pretty great, so I am excited to begin using it.

For those of you who use zsh, what do you like most about it? Any gotchas coming from bash?

0 Likes

#2

Not really much to contribute, i’ve meant to look into it for ever though, a mate of mine switched from bash way back in the mid-late 90s.

Supposedly much more feature-ful and powerful than bash, but back then there was a significant memory usage penalty. But back then we were talking about 4-16 MB of system RAM for most linux boxes. We’ve got 3 orders of magnitude more now.

0 Likes

#3

I started using it when I was provided a Macbook for work. Definitely worth it: https://ohmyz.sh/. I fell for it so much that I started using it in Fedora.

It was very seamless for me. The reason I continued using it is the amount of plugins and themes it has just out of the box. Easy to enable autocomplete for commonly used tools/command line applications. Minimised the amount of “I forgot how that flag/option is called, better look at manpages” thing, without mentioning the speedup it gives in general.

For the most part, it’s just like bash. I don’t use many more features extensively, I still script using bash, because portability. That also means it doesn’t hurt when switching back and worth between zsh and bash on servers either. It’s just different enough to be helpful and just the same old thing enough not to annoy me every day.

2 Likes

#4

Wow, that’s interesting. I wonder if this is them trying to win back the development crowd.

My experience was really bad, so I always assumed I was an outlier. It performed poorly, taking two seconds to execute a command sometimes. Nothing crazy, just ls or ll. That was unacceptable. Haven’t used it since.

0 Likes

#5

I use bash because I work on a ton of client machines and it’s sure to be installed everywhere. Same reason I use vi. Not because I like it.

If I could choose my shell freely I’d probably go with fish.

http://fishshell.com/

2 Likes

#6

Couldn’t you just reinstall bash tho

Also use fish its better.

Edit: just now seeing the comment above lol

0 Likes

#7

I guess I’ll have to learn zsh, or switch back over to bash. I use a macbook because I wanted a bulletproof machine to much about with servers. Having the same shell meant I could work on my scripts locally, then deploy them out.

The scripting differences seem like something I can bypass with emulation modes. Anyone familiar with those that wouldn’t mind a rough explanation?

1 Like

#8

Bash will still be installed, just run chsh and you’re good. Call bash in your shell scripts same as always.

0 Likes

#9

image

literally using it for auto complete :wink:

love it for that

2 Likes

#10

It’s because of gpl3. They can’t just use bash 3 forever, so they finally made a decision.

I highly doubt bash won’t be installed, it’s just no longer the default. It will definitely continue to be version 3 though.

From my brief tests, I could not find any bash that wouldn’t work or would produce unexpected results when run in zsh (tested various expansions, associative arrays and some other things I thought might be issues). zsh just adds some quality of life stuff and has a more open license.

Yeah, the autocomplete stuff is definitely the first thing I’m noticing and taking full advantage of.

1 Like

#11

Reap what you sow, pay what you owe.

- Stallman Cancer

0 Likes

#12

Zsh is the first thing I install on a new system. The second is oh-my-zsh.

0 Likes

#13

Guessing it is more to do with licensing

it’s far more permissive than GNU, and Apple are on a “remove GNU” crusade as v3.0 of the GPL is toxic to their platform. And most other platforms.

This is why a lot of unix-y appliance vendors start(ed) with FreeBSD instead.

0 Likes