News for hackers. Stuff that matters.
Re:Mastering Bash and Terminal by oblio on Saturday January 14, 2017 @04:42PM (#13400728)
zsh was quite popular when I first went spelunking in *NIX-land (2005). oh-my-zsh, which was a decent boost to zsh popularity, seems to have been around since 2009 (http://ohmyz.sh/).

zsh has always been held back by the "default browser"-syndrome: Linux and Mac OS both come with "good enough" default shells, so few people actually want to go through the effort of switching.

Especially since there is a bit of a learning curve to becoming more productive with zsh than you already are with bash.

Re:Mastering Bash and Terminal by dotancohen on Sunday January 15, 2017 @02:22AM (#13402813)
The problem with installing zch on my desktop is that I won't have it on the servers I SSH into. I need to know the proper spells and incantations that will work on a wide variety of distros and versions, many of which I don't personally maintain. Therefore, bash.
Re:Mastering Bash and Terminal by abalashov on Sunday January 15, 2017 @06:19AM (#13403526)
Indeed. The same argument applies to other exotic tooling, interesting vim plugins with many dependencies, etc.

It's one reason to keep one's environment relatively standard and boring. Otherwise, one comes to be dependent -- psychologically, at least -- on one's meticulously configured custom environment, and either chafes at its absence elsewhere or spends a great deal of time copying it everywhere.

Re:Mastering Bash and Terminal by dotancohen on Sunday January 15, 2017 @03:57PM (#13406363)
I must admit guilt to dragging my .vimrc and sometimes the whole of ~/.vim/ into machines that I'll be SSHing into for only a short time.
Re:Mastering Bash and Terminal by abalashov on Sunday January 15, 2017 @05:04PM (#13406662)
Me too. :-)
Re:Mastering Bash and Terminal by pmoriarty on Sunday January 15, 2017 @01:40PM (#13405549)
This was the argument that persuaded me to switch from zsh to bash decades ago. But after a while I realized that it really didn't matter whether you used zsh on your own machine. When you ssh in to another machine that has bash on it, it's going to be similar enough that you're not going to feel lost.

Bash and zsh only differ in some of their more advanced features, which I rarely use or miss on machines I ssh in to -- unless I spend most of my time on those remote machines, in which case I'll just install zsh there too. The main thing from zsh that I do miss on bash is advanced globbing, which is more convenient than the find command, but when I'm forced to use bash I'll just use find, and it's really no big deal.

So I encourage you not to let the fact that most machines have bash installed on them deter you from switching to zsh, if you're interested in zsh. I know I regret the years lost that I didn't use zsh myself.

Re:Mastering Bash and Terminal by JdeBP on Sunday January 15, 2017 @07:53AM (#13403757)
Conversely: I have the Z shell on all of the systems that I SSH into, ranging from OpenBSD to Debian Linux. I even have it on Interix on Windows as well. Many of them also have the Almquist shell and various flavours of the Korn shell available. A few even have the Thompson shell. (-:
Re:Mastering Bash and Terminal by erikb on Sunday January 15, 2017 @04:31AM (#13403227)
Also, when you use a lot of scripts that only work with bash (there are more than you'd expect, despite zsh saying it is bash compatible) then you have the choice of either rewriting these scripts or using bash. Most ppl will choose not to rewrite.
Re:Mastering Bash and Terminal by bigbugbag on Sunday January 15, 2017 @07:08AM (#13403658)
Many scripts are not written to be portable, bash or otherwise. The main reason those scripts rely on bashisms is that bash has long been the default shell in most distro.

IIRC debian provides a checkbashisms to know which scripts will pose problems when ran against /bin/sh

Re:Mastering Bash and Terminal by pmoriarty on Sunday January 15, 2017 @01:43PM (#13405560)
zsh never claimed it was compatible with bash. I'm not sure where you got that impression from. Maybe you're thinking of sh -- the bourne shell -- which zsh is in fact compatible with (as long as you limit your scripts to the bourne shell subset of zsh).
Re:Mastering Bash and Terminal by erikb on Monday January 16, 2017 @03:53AM (#13408882)
I'm not sure, where I've read it specifically, but it was a feature I was looking fore before switching to zsh about 5 years ago. What I found now is this: https://wiki.archlinux.org/index.php/zsh

Anyways. The core point is that compatibility often means compatible in 90%-99% of the cases. It's really really hard to be 100% compatible, which also requires one to emulate bugs etc.

Re:Mastering Bash and Terminal by pmoriarty on Tuesday January 17, 2017 @02:59PM (#13420626)
The web page you link to is mistaken. The zsh command "emulate sh" does not emulate bash. As the name says, it emulates sh, which is the bourne shell -- not bash.
Re:Mastering Bash and Terminal by blockloop on Saturday January 14, 2017 @04:45PM (#13400749)
You're probably right about oh-my-zsh. I really only hear people refer to zsh as "oh my zsh" which makes me smile.