Skip to content

Instantly share code, notes, and snippets.

@fforres
Last active July 17, 2019 18:06
Show Gist options
  • Save fforres/0575b5bfbf661f667cea9208867a101f to your computer and use it in GitHub Desktop.
Save fforres/0575b5bfbf661f667cea9208867a101f to your computer and use it in GitHub Desktop.
ZSHRC file with antigen
source $HOME/antigen.zsh
source $HOME/dev/src/github.com/segmentio/dotfiles/index.sh
DISABLE_UNTRACKED_FILES_DIRTY="true"
ENABLE_CORRECTION="false"
export SEGMENT_TEAM="app"
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle lein
antigen bundle pip
antigen bundle command-not-found
antigen bundle autojump
antigen bundle history
antigen bundle github
antigen bundle common-aliases
antigen bundle compleat
antigen bundle colorize
antigen bundle git-extras
antigen bundle brew
antigen bundle npm
antigen bundle osx
antigen bundle z
# Syntax autocompletition
antigen bundle zsh-users/zsh-completions
# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen theme https://github.com/denysdovhan/spaceship-zsh-theme spaceship
antigen apply
export SPACESHIP_GIT_SYMBOL="🚀 "
export ZSH_THEME="spaceship"
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nano'
else
export EDITOR='code'
fi
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export ZSH_CUSTOM="$ZSH/custom"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Auto Detect .nvmrc files
# https://github.com/creationix/nvm#zsh
# 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
alias robo='robo --config $HOME/dev/src/github.com/segmentio/robofiles/development/robo.yml'
alias cat='ccat'
# 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"
# Set list of themes to load
# Setting this variable when ZSH_THEME=random
# cause zsh load theme from this variable instead of
# looking in ~/.oh-my-zsh/themes/
# An empty array have no effect
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "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="true"
# 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="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# 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=(
# git
# )
source $ZSH/oh-my-zsh.sh
# Set Spaceship ZSH as a prompt
autoload -U promptinit; promptinit
prompt spaceship
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
bindkey "^[[1;10D" beginning-of-line
bindkey "^[[1;10C" end-of-line
bindkey "∑" backward-kill-word
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
alias gif2webp=~/webp/bin/gif2webp
alias gif=~/bin/gif
set PATH=~/bin:$PATH
export PATH
# tabtab source for serverless package
# uninstall by removing these lines or running `tabtab uninstall serverless`
[[ -f /Users/felipetores/.config/yarn/global/node_modules/tabtab/.completions/serverless.zsh ]] && . /Users/felipetores/.config/yarn/global/node_modules/tabtab/.completions/serverless.zsh
# tabtab source for sls package
# uninstall by removing these lines or running `tabtab uninstall sls`
[[ -f /Users/felipetores/.config/yarn/global/node_modules/tabtab/.completions/sls.zsh ]] && . /Users/felipetores/.config/yarn/global/node_modules/tabtab/.completions/sls.zsh
# tabtab source for slss package
# uninstall by removing these lines or running `tabtab uninstall slss`
[[ -f /Users/felipetores/dev/src/github.com/segmentio/serverless-render-test-publix/node_modules/tabtab/.completions/slss.zsh ]] && . /Users/felipetores/dev/src/github.com/segmentio/serverless-render-test-publix/node_modules/tabtab/.completions/slss.zsh
# added by travis gem
[ -f /Users/felipetores/.travis/travis.sh ] && source /Users/felipetores/.travis/travis.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment