dotfiles/zshrc

166 lines
3.1 KiB
Bash
Raw Normal View History

2013-12-28 17:32:06 +00:00
ZSH=$HOME/.oh-my-zsh
2018-08-17 13:02:13 +00:00
ZSH_THEME=dracula
2013-12-28 17:32:06 +00:00
CASE_SENSITIVE="true"
# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days)
export UPDATE_ZSH_DAYS=3
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want to disable command autocorrection
DISABLE_CORRECTION="true"
# Uncomment following line if you want red dots to be displayed while waiting
# for completion
COMPLETION_WAITING_DOTS="true"
# Uncomment 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"
plugins=(
2018-08-17 13:02:13 +00:00
archlinux
2017-06-06 17:54:44 +00:00
autoenv
aws
bundler
cabal
command-not-found
cp
docker
gem
git
git-hubflow
golang
heroku
hk
knife
2017-07-09 01:06:59 +00:00
mercurial
2017-06-06 17:54:44 +00:00
pip
postgres
python
rails
rake-fast
rbenv
redis-cli
rsync
ruby
tmux
vagrant
vi-mode
2013-12-28 17:32:06 +00:00
)
2014-11-12 16:00:11 +00:00
fpath=(/usr/local/share/zsh/site-functions $fpath)
2013-12-28 17:32:06 +00:00
source $ZSH/oh-my-zsh.sh
2015-08-19 00:14:39 +00:00
unalias gb
2017-06-04 23:34:10 +00:00
export VISUAL=vim
2014-11-12 16:00:11 +00:00
# The completion for aws is not compatible with $fpath :scream_cat:
if [[ -f /usr/local/share/zsh/site-functions/_aws ]] ; then
source /usr/local/share/zsh/site-functions/_aws
fi
2017-08-27 14:07:13 +00:00
if command -v xdg-open &>/dev/null; then
alias open=xdg-open
fi
2013-12-28 17:32:06 +00:00
unsetopt correct_all
2013-12-28 17:49:14 +00:00
bindkey '^R' history-incremental-search-backward
2013-12-28 17:32:06 +00:00
path=(
2017-06-06 17:54:44 +00:00
$HOME/bin
$HOME/go/bin
2017-12-16 02:34:09 +00:00
$HOME/.local/bin
2018-03-24 02:17:25 +00:00
$HOME/.cargo/bin
2017-06-06 17:54:44 +00:00
$HOME/.rbenv/bin
$HOME/.rbenv/shims
$HOME/.phpenv/bin
2017-08-17 20:31:30 +00:00
$HOME/.pyenv/bin
$HOME/perl5/bin
$HOME/code/trvs/bin
2017-06-06 17:54:44 +00:00
/usr/local/sbin
/usr/local/bin
/usr/bin/vendor_perl
2017-06-06 17:54:44 +00:00
/usr/sbin
/usr/bin
/sbin
/bin
2018-10-11 00:51:21 +00:00
/snap/bin
2017-06-06 17:54:44 +00:00
/usr/games
/usr/local/games
2013-12-28 17:32:06 +00:00
)
if which pyenv >/dev/null; then
eval "$(pyenv init - 2>/dev/null)"
2015-08-19 00:14:39 +00:00
fi
if which phpenv >/dev/null; then
eval "$(phpenv init - 2>/dev/null)"
fi
2015-08-19 00:14:39 +00:00
2018-03-24 02:17:25 +00:00
if [[ -f ~/.cargo/env ]]; then
source ~/.cargo/env
fi
2018-10-16 14:24:03 +00:00
eval "$(gimme '1.11.1')" 2>/dev/null
export GOPATH="$HOME/go"
2014-09-25 03:42:16 +00:00
CDPATH="$HOME/code:$HOME/src:$HOME/Development/src:$HOME/repos"
2014-12-04 15:11:43 +00:00
for prefix in github.com github.com/travis-ci github.com/meatballhat code.google.com/p ; do
CDPATH="$HOME/go/src/$prefix:$CDPATH"
2014-09-25 03:42:16 +00:00
done
2013-12-28 17:32:06 +00:00
2014-11-12 16:00:11 +00:00
export GPG_TTY=$(tty)
2013-12-28 17:32:06 +00:00
function dump-ssh-agent() {
2017-06-06 17:54:44 +00:00
env | awk '/SSH/ {
sub(/=/, "=\"", $1)
sub(/$/, "\"", $1)
print "export " $1
}' | tee ~/.ssh/agent.out
2013-12-28 17:32:06 +00:00
}
function load-ssh-agent() {
2017-06-06 17:54:44 +00:00
source ~/.ssh/agent.out
}
2014-02-08 23:44:04 +00:00
2017-06-06 17:54:44 +00:00
function start-ssh-agent() {
ssh-agent >~/.ssh/agent.out
}
function __maybesource() {
if [[ -f "${1}" ]]; then
source "${1}"
fi
}
2017-06-06 17:54:44 +00:00
load-ssh-agent &>/dev/null
__maybesource ~/.zshenv
__maybesource ~/.travis/travis.sh
__maybesource ~/google-cloud-sdk/path.zsh.inc
__maybesource ~/google-cloud-sdk/completion.zsh.inc
__maybesource /usr/share/nvm/init-nvm.sh
2017-07-09 01:06:59 +00:00
__maybesource ~/.kiex/scripts/kiex
if [[ -f ~/perl5/lib/perl5/local/lib.pm ]]; then
eval "$(perl -I ~/perl5/lib/perl5 '-Mlocal::lib')"
fi
if trvs version &>/dev/null; then
eval "$(trvs init -)"
fi
2014-10-06 19:24:23 +00:00
2017-06-06 12:18:54 +00:00
true