Table of Contents generated with DocToc
This quickstart includes a prompt theme that requires a powerline-compatible font in your terminal. Fonts that are powerline-compatible include glyphs used to display the nice branch icon that the theme in this .zshrc
uses, among other useful glyphs. Here are a few good powerline fonts I've found:
- Awesome Terminal Fonts - A family of fonts that includes some nice monospaced Icons.
- Fantasque Awesome Font - A nice monospaced font, patched with Font-Awesome, Octoicons and Powerline-Glyphs.
- Hack - Another Powerline-compatible font designed specifically for source code and terminal usage.
- Input Mono - A family of fonts designed specifically for code. It offers both monospaced and proportional fonts and includes powerline glyphs.
- Monoid - Monoid is customizable and optimized for coding with bitmap-like sharpness at 15px line-height even on low res displays.
- Nerd fonts - A collection of over 20 patched fonts (over 1,700 variations) & fontforge font patcher python script for powerline, devicons, and vim-devicons: includes Droid Sans, Meslo, AnonymousPro, ProFont, Inconsolta, and many more.
- Powerline patched font collection - A collection of a dozen or so fonts patched to include powerline gylphs.
- Download iTerm2 from http://www.iterm2.com. It is considerably nicer than the stock Terminal application that comes with OS X.
- Install the current version of Homebrew from http://brew.sh/.
- Install GNU Stow with
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
(or/usr/local/bin/zsh
if you decided to use the newer version packaged by brew)
- Install some powerline compatible fonts from one of the links in the Fonts section above.
- Install a powerline-compatible font from the Fonts section above.
- 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 -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 new fonts, then install one of the powerline fonts and specify it for your terminal application. If you get garbled branch glyphs, make sure there isn't a separate font setting for non-ASCII characters that you need to also set to your chosen powerline font.
Now that your fonts and default shell have been set up, install zgen and the dotfiles from this starter kit repository.
- Install Zgen
cd ~
git clone [email protected]:tarjoilija/zgen.git
- Install the starter kit
cd ~
git clone [email protected]: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 .zshrc
, .zsh_aliases
& .zsh_functions
files included in this kit enable:
- Automatic periodic updates to zgen and your plugins
- Cross-session shared history
- Deduping your command history
- Many more tab completions, courtesy of the zsh-users/zsh-completions repository, and periodic updating to tip of master of that repository.
- Proper command history search
- Syntax highlighting at the command line
- Tab completion of Rakefile targets
- Using oh-my-zsh compatible plugins and themes (via the zgen framework)
- Various helper functions for interacting with OS X's clipboard, audio volume, Spotlight and Quicklook.
The .zshrc
included in this kit will automatically source any files it finds in ~/.zshrc.d
. This is to make it easy for you to add extra functions and aliases without having to maintain a separate fork of this repository. The files will be sourced in alphanumeric order, I suggest a naming scheme of 001-onething
, 002-something-else
etc 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 without having to maintain a separate fork of this kit, if you create a file named ~/.zgen-local-plugins
, the .zshrc
from this starter kit will source that instead of running the load-starter-plugin-list
function defined in ~/.zgen-setup
. Note: using ~/.zgen-local-plugins
is not additive, it will completely replace the kit-provided list.
- 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, and tells you what it is
- 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 - A collection of 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 - Reads your Rakefile to tab complete the Rakefile targets
- unixorn/tumult.plugin.zsh - OSX specific functions and scripts.
- zsh-users/zsh-history-substring-search - Better history search
- zsh-users/zsh-syntax-highlighting - Syntax highlighting as you type
- zsh-users/zsh-completions - Tab completions for many more applications than come standard with zsh
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.
dotfiles.github.io/ has a lot of great resources for dotfiles - frameworks for managing them, configurations for editors and bootstraps with initial configurations to start from.
If you're using vim, spf13 is an excellent starter configuration and plugin collection.