zsh

Dec. 23rd, 2014 06:26 pm
roadrunnertwice: DTWOF's Lois in drag. Dialogue: "Dude, just rub a little Castrol 30 weight into it. Works for me." (Castrol (Lois))
[personal profile] roadrunnertwice

I finally switched from bash to zsh, and it was totally worth it.

I was paranoid about how much time it was going to take, but it turns out the trick is to do as little as possible, and most of your bash customizations will still work. It basically went like:

  • Refactor your dotfiles to just isolate any bash-specific stuff that's in there. .bash_profile should consist of source ~/.bashrc; .bashrc should have your little handful of bash-specific configurations followed by source ~/.profile; and .profile should have all the aliases and simple functions that will work in both.
  • Install oh-my-zsh and assemble a really simple .zshrc file. At the bottom, put source ~/.profile to catch all your old bash aliases and functions.
  • Look through the list of themes on the wiki and find something that looks familiar enough that you won't feel weird. I went with muse.
  • Maybe make one or two edits to that theme and save it as a custom one. I looked through lib/git.zsh and figured out how to add an indicator that my git branch is ahead or behind.

In the end, I got pretty much all I needed out of the box and only had to make about a four-line edit to the muse theme. Better tab completion, and I can spend about 90% less time running git status at work.

I realize this is of limited interest to this blog but oh well.