Created
March 29, 2017 23:04
-
-
Save surkin/2d773afd0396d28e5971625dc2c1dd68 to your computer and use it in GitHub Desktop.
zshrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/surkin/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally if you set this to "random" it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="agnoster" | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to use hyphen-insensitive completion. Case | |
# sensitive completion must be off. _ and - will be interchangeable. | |
HYPHEN_INSENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment the following line to disable colors in ls. | |
# DISABLE_LS_COLORS="true" | |
# Uncomment the following line to disable auto-setting terminal title. | |
DISABLE_AUTO_TITLE="true" | |
# Uncomment the following line to enable command auto-correction. | |
ENABLE_CORRECTION="false" | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much much faster. | |
# DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
HIST_STAMPS="dd.mm.yyyy" | |
# Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=$ZSH/custom/not-there | |
# 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=(command-not-found globalias systemadmin common-aliases zsh_reload zsh-nvm history-substring-search zsh-better-npm-completion brew docker docker-compose osx) | |
# User configuration | |
export GOPATH=$HOME/Projects/Go | |
export PATH=$PATH:/usr/local/opt/go/libexec/bin:$GOPATH/bin | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH" | |
export MANPATH="/usr/local/man:$MANPATH" | |
export NVM_LAZY_LOAD=true | |
if (( ! ${fpath[(I)/usr/local/share/zsh/site-functions]} )); then | |
FPATH=/usr/local/share/zsh/site-functions:$FPATH | |
fi | |
source $ZSH/oh-my-zsh.sh | |
# You may need to manually set your language environment | |
export LANG=en_US.UTF-8 | |
export CLICOLOR_FORCE=1 | |
# Preferred editor for local and remote sessions | |
if [[ -n $SSH_CONNECTION ]]; then | |
export EDITOR='nano' | |
else | |
export EDITOR='code' | |
fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# export LC_CTYPE="en_US.UTF-8" | |
# export CC="xcrun clang" | |
# export CXX="xcrun clang++" | |
# export OBJC="xcrun clang" | |
# export OSX_VERSION=10.12 | |
# ssh | |
export SSH_KEY_PATH="~/.ssh/dsa_id" | |
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home | |
export OPENSSL_DIR=/usr/local/Cellar/openssl | |
export HOMEBREW_GITHUB_API_TOKEN="1cfe583bd1f965ec2b3d5be612732a25b89b3580" | |
export HOMEBREW_CASK_OPTS='--appdir=/Applications' | |
# export RBENV_ROOT=/usr/local/var/rbenv | |
# | |
# export PATH="$HOME/.fastlane/bin:$PATH" | |
export PATH=/Library/Developer/Toolchains/XCodeDefault.xctoolchain/usr/bin:/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}" | |
# DVM (Docker Version Manager) | |
# [ -f /usr/local/opt/dvm/dvm.sh ] && . /usr/local/opt/dvm/dvm.sh | |
# Set personal aliases overriding those provided by oh-my-zsh libs | |
# plugins and themes. Aliases can be placed here though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases run `alias`. | |
# | |
# Example aliases | |
alias zshconfig="cd $HOME/.oh-my-zsh; $EDITOR $HOME/.zshrc" | |
alias ohmyzsh="$EDITOR $HOME/.oh-my-zsh" | |
# alias vlc="/Applications/VLC.app/Contents/MacOS/VLC" | |
alias vlcconfig="$EDITOR $HOME/Library/Preferences/org.videolan.vlc/vlcrc" | |
alias cask="brew cask" | |
alias discover="/usr/local/bin/nmap -PN -sS -O -A " | |
# alias ls="ls --color=always " | |
function get-tube() { | |
emulate -L zsh | |
local tube_url=$(clippaste | cat) | |
echo "Input: $tube_url" | |
local movie_url=$(youtube-dl -v -g $(clippaste | cat) | egrep -o \.\*mp4) | |
echo "Output: $movie_url" | clipcopy | |
return 1 | |
} | |
alias gt=get-tube | |
# place this after nvm initialization! | |
autoload -U add-zsh-hook | |
load-nvmrc() { | |
local node_version="$(nvm version)" | |
local nvmrc_path="$(nvm_find_nvmrc)" | |
if [ -n "$nvmrc_path" ]; then | |
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") | |
if [ "$nvmrc_node_version" = "N/A" ]; then | |
nvm install | |
elif [ "$nvmrc_node_version" != "$node_version" ]; then | |
nvm use | |
fi | |
elif [ "$node_version" != "$(nvm version default)" ]; then | |
echo "Reverting to nvm default version" | |
nvm use default | |
fi | |
} | |
add-zsh-hook chpwd load-nvmrc | |
load-nvmrc | |
# Initialise zulu plugin manager | |
source "${ZULU_DIR:-"${ZDOTDIR:-$HOME}/.zulu"}/core/zulu" | |
zulu init | |
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment