

Using ZSH - preek
http://jbw.cc/2010/07/20/using-zsh/

======
ihodes
This is pretty convincing for me—I've been holding off on switching from bash
for years now.

The single thing keeping me back is that bash is _the_ shell to use, and some
scripts you need to setup xxx thing are written _for_ bash, and trying to
debug some small difference in behavior between zsh and bash is something I
don't want to find myself doing.

Has anyone else not switched because of this, or switched after grappling with
similar issues? What are your thoughts?

~~~
gnosis
I used to use zsh, long long ago. Then, when I became a sysadmin I switched to
bash because of its ubiquity. I've been a bash user for well over a decade,
until recently when I switched back to zsh.

During my switch, I learned a few things. First, it really wasn't particularly
painful to switch all my personal scripts to zsh. I guess I probably wasn't
using that many bashisms, and the few I was using were easily convertible to
zsh syntax.

Second, day to day use of zsh does not feel all that much different from bash,
and it really takes very little time to get used to if you already know bash.
Of course, learning and getting comfortable with using some of the completely
different zsh features will take time. I'm learning them in small bites.

Third, despite bash's ubiquity, I now wish I'd just used zsh all along, as
they're really not different enough to hamper the use of bash when you need to
use it.

Fourth, (depending on what you want to do) getting in to the nitty-gritty of
configuring zsh is not always easy. zsh is thoroughly documented, but at the
same time the documentation is not very user friendly, and there really aren't
enough well-written introductory tutorials to quickly get you up to speed on
doing more advanced things like writing your own completion widgets (or even
editing existing ones, as they're so poorly commented). So if you want to
customize zsh's more advanced features, be prepared to spend a lot of time
with the man pages and user's guide.

On the other hand, there are some really helpful people on freenode's #zsh
channel. With their help your transition to zsh should be pretty painless.

As to your particular concern about debugging existing bash scripts, I
wouldn't worry too much about it. The shells are really not so different in
syntax that you'd be completely lost when you wanted to debug some bash
script. And if you do run in to problems with them, you could always ask for
help on freenode's #bash.

~~~
hbt
One last thing you forgot to mention. zsh is rarely installed on remote hosts.
bash is everywhere.

This is a game changer in my case where I can simply download my
configuration, load it in the current session and start using all my scripts,
aliases on a remote host in less than a minute.

Don't get me wrong, I'm using zsh for personal stuff and computers I have
complete control over. But, if I have to write a script, I'll make sure it
works with Bash first.

~~~
gnosis
_"I can simply download my configuration, load it in the current session and
start using all my scripts, aliases on a remote host in less than a minute"_

Nothing's stopping you from uploading zsh itself to your remote hosts along
with your .zshrc.

Or just use the package manager to install zsh on those machines. On any
modern Linux distro it's as easy as typing something like "emerge zsh" or
"apt-get install zsh".

------
Nick_C
Here's why I have't changed over. I've used bash for years and know it pretty
well. I dabbled with zsh a few times, but in the end it came down to the
benefit not being worth the cost.

The cost is that the default config requires a fair bit of tweaking to get
usable, and the knowledge to do that tweaking is not easily found, not so
newbie-friendly as another commenter above mentions, so I have to learn a
bunch of beginner stuff first before I can start to get the extra power
benefits.

FWIW, I found that _really_ understanding readline and .inputrc gave me much
greater power in bash for less effort than having to learn zsh. The extra
return of zsh wasn't worth the effort.

------
crazydiamond
I am going to use your blog post to make the switch over from bash. I've tried
zsh 2 times but reverted (can't recall why).

Please keep logging your journey. Also, what are the problems you have faced ?
What did not work ? Any bash_profile or bashrc lines you could not convert?
Any bash scripts that did not run ?

~~~
jbw
I would check out Oh-My-ZSH on GitHub (<https://github.com/robbyrussell/oh-my-
zsh>). This makes it very quick and painless to get ZSH set up.

As for any problems, I didn't really face any. I'm not a system admin so bash
wasn't a big part of my day to day. I can still run bash scripts in ZSH
(because of the shebang line) and there wasn't anything in my bash_profile
that could not be converted. Because of this, there was hardly anything to
stopping me using ZSH.

But check out oh-my-zsh it's a good starting point which I found soon after I
had set up my own configuration and I now use it too.

~~~
crazydiamond
Your first easy installation procedure fails, and asks me to use this: \--no-
check-certificate

I used this with wget and it works. I hope this is okay. Thanks a lot.

------
jbw
Fixed a typo in the HTML for your viewing pleasure...

------
pythonrocks
Bash's dead, baby. Viva zsh!

