This is how I've configured my terminal:
I use a special font in my terminal so I can have the cool arrow and git SCM characters. These are fonts from the Powerline VIM plugin but they work with anything.
I use iTerm2 as my terminal (http://iterm2.com/)
- Install iTerm 2
jffry.itermcolorsfrom this repo to your disk
- Settings -> Profiles -> (edit default)
- Colors tab: At the bottom, Load Presets... -> Import -> go pick
jffry.itermcolorswherever you saved it
- Text tab: At the bottom, set both "Regular Font" and "Non-ASCII Font" to use whichever of the Powerline fonts you settled on (for me,
12pt Meslo LG M Regular for Powerline). Make sure to set anti-aliased to on.
- Window tab: Change window transparency to look 100% opaque, otherwise these fonts will render weird. Disable blur.
- Terminal tab: Make sure character encoding is
Unicode (UTF-8)and not Ascii
zsh as my shell, because
zsh is great. You can install it with homebrew, and then make it your default shell:
$ brew install zsh ... $ chsh -s /usr/local/bin/zsh
If you don't like it, you can always change it back to bash later.
You may need to edit
/etc/shells (as root / via
sudo) and add a line for
/usr/local/bin/zsh, then reboot, then re-run the
chsh command, then reboot again, if you have trouble.
oh-my-zsh / custom theme
robbyrussell/oh-my-zsh is a framework for managing your zsh config.
Follow their instructions for downloading and setting up
oh-my-zsh. Once you have done that, you'll need to download my zsh theme:
curl https://raw.githubusercontent.com/jffry/terminal-config/master/jffry.zsh-theme > ~/.oh-my-zsh/themes/jffry.zsh-theme
You'll also need to edit your
~/.zshrc. At a minimum, enable the
git plugin and set your
ZSH_THEME to be
~/.zshrc looks like this, yours may have other settings or comments too:
# ~/.zshrc export ZSH=$HOME/.oh-my-zsh ZSH_THEME="jffry" plugins=(git) source $ZSH/oh-my-zsh.sh source ~/.profile
Now if you
cd into a directory with a git repo checked out, you should see the current branch on the right side. If there's changes, it will be yellow, otherwise it'll be white.
On the left side is your username in green, then the current directory (last 2 levels of folders) in blue. If one of those directories is called
spark it will be replaced with a lightning bolt emoji, e.g.
~/spark/web/ will be shown as
⚡/web in the terminal.
I use the excellent rupa/z to hop around quickly to directories where I've previously been.
It's easy to install via Homebrew, via
brew install z - after this, Homebrew will tell you that you need to add a line to
~/.zshrc, like this:
# after other stuff in .zshrc, add this line: source `brew --prefix`/etc/profile.d/z.sh
Restart your terminal, and then you can hop around. See
man z for details.