lundi 22 février 2010
Switching to zsh
Par Sébastien Pierre, lundi 22 février 2010 à 10:58 :: General
So last Friday, updating my Ubuntu 9.10 resulted in my inability to log in -- apparently something broke tcsh, which has been my shell of choice for some time now. It's an awkward situation to be unable to login to your computer, but (thank God) I had a "demo" account which allowed me to get things right. I wonder what would have happened if tcsh broken on one of my servers... I remember being unable to find a way to start an ssh session without starting the user's default shell... ouch !
Anyway, I've been contemplating the idea of switching to zsh for some time, and I found it was the right time to do the transition. So far, so good ! Here are the things I really loved in zsh:
- Proper right prompt support: tcsh was the only shell to support a proper right prompt -- when I mean proper, I mean it works even when you resize the terminal or when what you write on the command line reaches the right prompt. It's a small detail, but this kept me hooked to tcsh

- Amazing completion: I was always jealous of bash to allow completion of
$VAReven within expressions (like/some/path/$VAR). Zsh does this and much, much more. Try typing "man <something>" and it will tell you if there is a man page or not - Good programmability: tcsh does not support functions, which pleased my sense of simplicity, but which starts to be painful when you want to do advanced prompt configuration (like tell if you're in a screen session or within a git repository). I know bash does this too, but zsh just seems better

- Good community support and documentation: it's not too difficult to find good zsh configuration examples, and the community is very responsive, which makes the transition much easier !
I've also tried the FISH shell, but its relative slowness and worse, lack of vi bindings made me prefer zsh. It's interesting to try though, if you don't despeartly need a right prompt and vi bindings 