Skip to content

Instantly share code, notes, and snippets.

$sudo sh -c 'echo /opt/local/bin/zsh >>/etc/shells'
enter password:
$ cat zshcat /etc/shells
cat: zshcat: No such file or directory
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/ksh
sudo chpass -s '/opt/local/bin/zsh' $USER
% cat ~/.zshrc
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
eval $(/usr/libexec/path_helper -s)
% sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Cloning Oh My Zsh...
Cloning into '/Users/davidmidlo/.oh-my-zsh'...
remote: Counting objects: 829, done.
remote: Compressing objects: 100% (699/699), done.
remote: Total 829 (delta 14), reused 742 (delta 9), pack-reused 0
Receiving objects: 100% (829/829), 565.45 KiB | 528.00 KiB/s, done.
Resolving deltas: 100% (14/14), done.
Looking for an existing zsh config...
Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh
% cat .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/davidmidlo/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
% git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
% sed -i.bak 's~\(ZSH_THEME="\)[^"]*\(".*\)~\1powerlevel9k\/powerlevel9k\2~' ~/.zshrc
% cat .zshrc | grep ZSH_THEME
ZSH_THEME="powerlevel9k/powerlevel9k"
% git clone https://github.com/gabrielelana/awesome-terminal-fonts.git --branch patching-strategy --single-branch ~/.oh-my-zsh/custom/themes/powerlevel9k/awesome-terminal-fonts
% : open ~/.oh-my-zsh/custom/themes/powerlevel9k/awesome-terminal-fonts/fonts/*.ttf
% sed -i.bak 's/^ZSH_THEME.*/POWERLEVEL9K_MODE=\"awesome-patched\"\'$'\n&/' ~/.zshrc
% cat ~/.zshrc
# Relevant Output
#...
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
POWERLEVEL9K_MODE="awesome-fontconfig"
ZSH_THEME="powerlevel9k/powerlevel9k"
###### Powerlevel9k Settings
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="\n"
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="%K{white}%F{black}\n . %f%k%F{white}%f $ "
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon ssh context root_indicator dir dir_writable vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time background_jobs anaconda pyenv virtualenv rbenv rvm nodeenv nvm time)
POWERLEVEL9K_DIR_HOME_BACKGROUND='087'
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(boot2docker codeclimate colored-man-pages colorize command-not-found common-aliases cp django docker docker-compose ember-cli fabric gem git git-extras git-prompt git-remote-branch github gnu-utils macports man nmap node npm nvm osx pip pylint python ruby rvm spring sublime sudo systemd taskwarrior urltools vagrant virtualenv web-search xcode zsh-autosuggestions zsh-completions zsh-navigation-tools zsh_reload zsh-syntax-highlighting history-substring-search)