Table of Contents generated with DocToc
- Download iTerm2 from http://www.iterm2.com. Seriously, never use Terminal again.
- Install the current version of Homebrew from http://brew.sh/.
brew install stow
- Homebrew has a newer version of zsh than the one Apple ships, so
brew install zsh
to install it. - Switch your shell to zsh
- System Preferences -> Users & Groups.
- Unlock the preferences
- Select your user
- Select advanced options
- Set your login shell to
/bin/zsh
(/usr/local/bin/zsh
if you decided to use a newer version from brew)
- Install some powerline compatible fonts from https://github.com/Lokaltog/powerline-fonts or Input Mono. Fonts that are Powerline-compatible include glyphs used to display the nice branch icon that the theme in this
.zshrc
uses.- Clone the powerline-fonts repository, or download Input Mono.
- Copy the fonts into
~/Library/Fonts
. - In iTerm 2, go to Preferences->Profile in your iTerm 2 preferences, then select one of the powerline compatible fonts you just installed.
- Make sure you also specify a powerline compatible font for non-ASCII in your iTerm 2 preferences or the prompt separators and branch glyphs will show up garbled.
- Switch your shell to zsh with chsh
chsh -s /bin/zsh
- Install GNU Stow -
yum install -y stow
on Red Hat / CentOS systems
I don't use a GUI on Linux, so you'll have to track down how to install the powerline-fonts and specify one for your terminal application.
Now that your fonts and default shell have been set up, install zgen and the starter kit dotfiles.
- Install Zgen
cd ~
git clone git@github.com:tarjoilija/zgen.git
- Install the starter kit
cd ~
git clone git@github.com:unixorn/zsh-quickstart-kit.git
- Configure zsh by symlinking the
.zshrc
,.zsh_aliases
and.zsh-completions
from this repo into your~
.- You can do this with stow by:
cd zsh-quickstart-kit
stow --target=/Users/YourUsername zsh
. Replace/Users/YourUsername
with/home/YourUsername
if you're on Linux.
- You can do this with stow by:
The included .zshrc
, .zsh_aliases
& .zsh_functions
files enable:
- Automatic periodic install and update of zgen and your plugins
- Cross-session shared history
- Deduping your command history
- Many more tab completions, courtesy of the zsh-users/zsh-completions repository
- Proper command history search
- Syntax highlighting at the command line
- Tab completion of Rakefile targets
- Various helper functions for interacting with OS X's clipboard, audio volume, and Quicklook.
- oh-my-zsh compatible plugins and themes (via the zgen framework)
The .zshrc
included in this kit will automatically source any files it finds in ~/.zshrc.d
. This makes it easy for you to add extra functions and aliases without having to maintain a separate branch of this repo. The files will be sourced in alphanumeric order, I suggest a naming scheme of 001-onething
, 002-something-else
to ensure they're loaded in the order you expect.
I've included what I think is a good starter set of zsh plugins in this repository. To make the list easier to customize, if you create a file named ~/.zgen-local-plugins
, the starter kit will source that instead of running load-starter-plugin-list
as defined in .zgen-setup
. Note: ~/.zgen-local-plugins
is not additive, it completely replaces the kit-provided list.
Included plugins:
- RobSis/zsh-completion-generator - Adds tool to generate zsh completion functions for programs missing them
- chrissicool/zsh-256color - sets your terminal to 256 colors if available
- djui/alias-tips - Warns you when you have an alias for the command you just typed
- peterhurford/git-it-on.zsh - Opens your current repo on github, in your current branch
- rimraf/k - k is a directory lister that also shows git status on files & directories
- sharat87/pip-app - A set of shell functions to make it easy to install small apps and utilities distributed with pip
- skx/sysadmin-util - Collected scripts useful for sysadmins
- srijanshetty/docker-zsh - Docker completions
- stackexchange/blackbox - Tom Limoncelli's tool for storing secret information in a repository with gnupg encryption, automatically decrypting as needed
- unixorn/autoupdate-zgen - Adds autoupdate (for both zgen itself, and your plugins) to zgen
- unixorn/git-extra-commands - Collected extra git helper scripts
- unixorn/jpb.zshplugin - Some of my standard aliases & functions
- unixorn/rake-completion.zshplugin - Tab completion for Rakefile targets
- zsh-users/zsh-history-substring-search - Better history search
- zsh-users/zsh-syntax-highlighting - Syntax highlighting as you type
We also have zgen load oh-my-zsh and these plugins:
- oh-my-zsh
- aws
- brew
- chruby
- colored-man
- git
- github
- osx
- pip
- python
- rsync
- screen
- sudo
- vagrant
For a list of other ZSH plugins and themes you can use, check out my awesome-zsh-plugins list.
If you're using vim, spf13 is an excellent starter configuration and plugin collection.