These are my steps in migration from bash to zsh. I’m documenting these to keep the future reference for me (and possibly other readers as well).
Check out the Slideshare presentation: Why Zsh is Cooler than Your Shell
to find out the current shell:
ps -p $$
it’s useful during migration to make sure the new shell is really in use.
Migration itself included (on my Fedora) reconfiguring:
- default shell: (inspired by: http://unix.stackexchange.com/questions/39881/running-chsh-does-not-change-shell)
chsh -s /bin/zsh
- konsole: in
Edit Current Profilefor:
- gnome-terminal: no changes required, seems to go for the default shell.
- xterm: no changes required, seems to go for the default shell.
- tmux: (from: http://superuser.com/questions/253786/how-can-i-make-tmux-use-my-default-shell)
set-option -g default-shell /bin/zsh
There exists users’ maintained collection of
zsh customizations, that I found useful. Called: oh-my-zsh. (Please note the amazing Github’s – Star count. Once seeing that I didn’t doubt I’ll give it a try.)
For installation I just went for:
curl -L http://install.ohmyz.sh | sh
oh-my-zsh with powerline
I’m used to powerline everywhere (
bash) already, so let’s keep it working in
zsh as well.
I created file:
~/.oh-my-zsh/custom/powerline.zsh with contents:
Please note: You need to go for the actual location of
powerline installation on your system.
and in the file:
~/.zshrc I had to comment out line:
oh-my-zsh theme seems to conflict with
The real benefit of
oh-my-zsh commes with plugins, so I went for those I find useful. Via changing the file:
plugins=(git mvn glassfish yum colored-man vagrant z common-aliases gradle)
oh-my-zsh custom stuff
~/.bashrc held already quite some customizations, I migrated those to:
Even this part was nice, as I could tidy up things a bit and omit unused stuff. Moreover I decided to create multiple
*.zsh files (as these are auto-loaded) to achieve modularity.
Honestly in the beginning, I had no clue how much I would enjoy my new shell.