Skip to content

Instantly share code, notes, and snippets.

@nmn nmn/.zshrc
Created Apr 12, 2016

Embed
What would you like to do?
My Shell
# PREREQUISITES:
# install docker
# git clone antigen into your home folder. Should be able to find $HOME/antigen.zsh
# install rvm
# git clone zsh-autosuggestions into ~/.zsh/
# so `source ~/.zsh/zsh-autosuggestions/autosuggestions.zsh` works.
# Switch terminal to zsh instead of bash
export BROWSER_SYNC_HOSTNAME=<USERNAMEHERE>.dev.agkn.net
export GOPATH=$HOME/go-packages/
export AUTOSUGGESTION_ACCEPT_RIGHT_ARROW=1
eval "$(docker-machine env default)"
alias mv='mv -v'
alias rm='rm -i -v'
alias cp='cp -v'
alias cask='brew cask' # i <3 u cask
alias where=which # sometimes i forget
alias brwe=brew #typos
alias hosts='sudo $EDITOR /etc/hosts' # yes I occasionally 127.0.0.1 twitter.com ;)
# `cat` with beautiful colors. requires: sudo easy_install -U Pygments
alias c='pygmentize -O style=monokai -f console256 -g'
# Undo a `git push`
alias undopush="git push -f origin HEAD^:master"
# git root
alias gr='[ ! -z `git rev-parse --show-cdup` ] && cd `git rev-parse --show-cdup || pwd`'
# Networking. IP address, dig, DNS
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias dig="dig +nocmd any +multiline +noall +answer"
# Recursively delete `.DS_Store` files
alias cleanup="find . -name '*.DS_Store' -type f -ls -delete"
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; rm -rfv ~/.Trash; sudo rm /private/var/vm/sleepimage"
alias brew_update="brew -v update; brew -v upgrade --all; brew cleanup; brew cask cleanup; brew prune; brew doctor"
alias update_brew_npm='brew_update; npm install npm -g; npm update -g;'
# Shortcuts
alias g="git"
source $HOME/antigen.zsh
source $HOME/.rvm/scripts/rvm
antigen use oh-my-zsh
antigen bundle git
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
antigen bundle autojump
antigen bundle common-aliases
antigen bundle compleat
antigen bundle git-extras
antigen bundle osx
antigen bundle node
antigen bundle npm
antigen bundle z
antigen bundle brew
antigen bundle sudo
antigen bundle nmn/gulp.plugin.zsh
antigen bundle zsh-users/zsh-syntax-highlighting
antigen theme nmn/gnzh-node ./gnzh-node.zsh-theme
antigen apply
# source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zsh/zsh-autosuggestions/autosuggestions.zsh
zle-line-init() {
zle autosuggest-start
}
zle -N zle-line-init
# code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.