2019-05-13 13:45:12 +00:00
|
|
|
[[ "${ZSH_DEBUG}" ]] && set -o xtrace
|
|
|
|
|
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"
|
|
|
|
|
2018-12-29 21:40:11 +00:00
|
|
|
path=(
|
2021-12-20 18:36:20 +00:00
|
|
|
$HOME/.rbenv/shims
|
|
|
|
$HOME/.pyenv/shims
|
|
|
|
$HOME/bin
|
|
|
|
$HOME/go/bin
|
|
|
|
$HOME/.local/bin
|
2018-12-29 21:40:11 +00:00
|
|
|
$HOME/.cargo/bin
|
|
|
|
$HOME/.rbenv/bin
|
|
|
|
$HOME/.phpenv/bin
|
|
|
|
$HOME/.pyenv/bin
|
2019-04-15 12:52:33 +00:00
|
|
|
$HOME/.yarn/bin
|
2021-07-07 14:03:13 +00:00
|
|
|
$HOME/.pulumi/bin
|
2022-04-28 20:22:38 +00:00
|
|
|
${KREW_ROOT:-$HOME/.krew}/bin
|
2021-09-25 01:38:16 +00:00
|
|
|
$HOME/.local/bin
|
2018-12-29 21:40:11 +00:00
|
|
|
$HOME/perl5/bin
|
2020-03-26 13:47:53 +00:00
|
|
|
$HOME/Library/Python/3.8/bin
|
|
|
|
/usr/local/opt/python@3.8/bin
|
2018-12-29 21:40:11 +00:00
|
|
|
/usr/local/sbin
|
|
|
|
/usr/local/bin
|
|
|
|
/usr/bin/vendor_perl
|
|
|
|
/usr/sbin
|
|
|
|
/usr/bin
|
|
|
|
/sbin
|
|
|
|
/bin
|
|
|
|
/snap/bin
|
|
|
|
/usr/games
|
|
|
|
/usr/local/games
|
2020-03-26 13:47:53 +00:00
|
|
|
/usr/local/texlive/2018/bin/x86_64-darwin
|
2018-12-29 21:40:11 +00:00
|
|
|
)
|
|
|
|
|
2013-12-28 17:32:06 +00:00
|
|
|
plugins=(
|
2018-08-17 13:02:13 +00:00
|
|
|
archlinux
|
2017-06-06 17:54:44 +00:00
|
|
|
aws
|
2022-04-28 20:22:38 +00:00
|
|
|
brew
|
2017-06-06 17:54:44 +00:00
|
|
|
bundler
|
|
|
|
command-not-found
|
|
|
|
cp
|
2022-01-03 15:24:30 +00:00
|
|
|
direnv
|
2017-06-06 17:54:44 +00:00
|
|
|
docker
|
|
|
|
gem
|
|
|
|
git
|
|
|
|
golang
|
2021-02-25 13:28:15 +00:00
|
|
|
helm
|
2017-06-06 17:54:44 +00:00
|
|
|
heroku
|
2022-01-03 15:24:30 +00:00
|
|
|
httpie
|
2021-02-25 13:28:15 +00:00
|
|
|
kubectl
|
2017-07-09 01:06:59 +00:00
|
|
|
mercurial
|
2021-07-28 17:46:58 +00:00
|
|
|
minikube
|
2021-02-25 13:35:58 +00:00
|
|
|
nmap
|
|
|
|
node
|
|
|
|
nvm
|
2017-06-06 17:54:44 +00:00
|
|
|
pip
|
|
|
|
postgres
|
2021-02-25 13:35:58 +00:00
|
|
|
pyenv
|
2017-06-06 17:54:44 +00:00
|
|
|
python
|
|
|
|
rails
|
|
|
|
rake-fast
|
|
|
|
rbenv
|
|
|
|
redis-cli
|
|
|
|
rsync
|
|
|
|
ruby
|
2021-02-25 13:35:58 +00:00
|
|
|
rust
|
|
|
|
terraform
|
2017-06-06 17:54:44 +00:00
|
|
|
tmux
|
|
|
|
vagrant
|
2020-03-08 04:30:26 +00:00
|
|
|
vault
|
2017-06-06 17:54:44 +00:00
|
|
|
vi-mode
|
2021-02-25 13:35:58 +00:00
|
|
|
yarn
|
2013-12-28 17:32:06 +00:00
|
|
|
)
|
|
|
|
|
2022-04-28 20:22:38 +00:00
|
|
|
if [[ -x /home/linuxbrew/.linuxbrew/bin/brew ]]; then
|
|
|
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
|
|
|
fi
|
|
|
|
|
2021-07-07 14:03:48 +00:00
|
|
|
if [[ -d ~/.oh-my-zsh/plugins/just/ ]]; then
|
|
|
|
plugins+=just
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
|
2019-03-07 16:04:17 +00:00
|
|
|
unalias gb &>/dev/null
|
2015-08-19 00:14:39 +00:00
|
|
|
|
2022-01-03 15:24:30 +00:00
|
|
|
export EDITOR=vim
|
2020-08-17 02:30:03 +00:00
|
|
|
export PYENV_ROOT="${HOME}/.pyenv"
|
|
|
|
export SDKMAN_DIR="${HOME}/.sdkman"
|
2022-01-03 15:24:30 +00:00
|
|
|
export VISUAL=vim
|
2017-06-04 23:34:10 +00:00
|
|
|
|
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
|
|
|
|
|
2019-03-07 16:04:17 +00:00
|
|
|
if [[ -f ~/.local/bin/aws_zsh_completer.sh ]]; then
|
|
|
|
source ~/.local/bin/aws_zsh_completer.sh
|
|
|
|
fi
|
|
|
|
|
2017-08-27 14:07:13 +00:00
|
|
|
if command -v xdg-open &>/dev/null; then
|
|
|
|
alias open=xdg-open
|
|
|
|
fi
|
|
|
|
|
2021-01-25 03:26:14 +00:00
|
|
|
if command -v setxkbmap &>/dev/null; then
|
|
|
|
alias kbus='setxkbmap -layout us'
|
|
|
|
alias kbdv='setxkbmap -layout dvorak'
|
|
|
|
fi
|
|
|
|
|
2020-09-15 23:21:33 +00:00
|
|
|
if R --version &>/dev/null; then
|
2020-09-15 23:28:02 +00:00
|
|
|
alias R='R --no-save --no-restore-data'
|
2020-09-15 23:21:33 +00:00
|
|
|
fi
|
|
|
|
|
2021-02-13 18:06:18 +00:00
|
|
|
if command -v ssh-add &>/dev/null; then
|
|
|
|
alias ssh-add='ssh-add -t 1h'
|
|
|
|
fi
|
|
|
|
|
2021-05-29 17:10:51 +00:00
|
|
|
if psql --version &>/dev/null; then
|
|
|
|
alias pgme='psql -d postgres://me@jool.meatballhat.com:15744/me'
|
|
|
|
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
|
|
|
|
2017-05-15 15:25:46 +00:00
|
|
|
if which pyenv >/dev/null; then
|
|
|
|
eval "$(pyenv init - 2>/dev/null)"
|
2015-08-19 00:14:39 +00:00
|
|
|
fi
|
|
|
|
|
2017-05-15 15:25:46 +00:00
|
|
|
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
|
|
|
|
|
2019-05-13 13:45:12 +00:00
|
|
|
if gimme --version &>/dev/null; then
|
2022-11-13 02:50:13 +00:00
|
|
|
eval "$(gimme stable)" 2>/dev/null
|
2019-05-13 13:45:12 +00:00
|
|
|
export GOPATH="$HOME/go"
|
|
|
|
fi
|
2014-09-25 03:42:16 +00:00
|
|
|
|
2017-05-15 15:25:46 +00:00
|
|
|
CDPATH="$HOME/code:$HOME/src:$HOME/Development/src:$HOME/repos"
|
2019-04-15 12:52:33 +00:00
|
|
|
for prefix in github.com github.com/meatballhat code.google.com/p ; do
|
2017-05-15 18:47:09 +00:00
|
|
|
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)
|
|
|
|
|
2017-06-13 14:33:29 +00:00
|
|
|
function __maybesource() {
|
|
|
|
if [[ -f "${1}" ]]; then
|
2019-05-13 13:45:12 +00:00
|
|
|
if [[ "${2}" == silent ]]; then
|
|
|
|
source "${1}" &>/dev/null
|
|
|
|
else
|
|
|
|
source "${1}"
|
|
|
|
fi
|
2017-06-13 14:33:29 +00:00
|
|
|
fi
|
|
|
|
}
|
2017-06-06 17:54:44 +00:00
|
|
|
|
2020-03-26 13:47:53 +00:00
|
|
|
function docker-cleanup() {
|
|
|
|
local once
|
|
|
|
if [[ "${1}" == once ]]; then
|
|
|
|
once=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
date -u
|
|
|
|
echo ----
|
|
|
|
docker images --filter='dangling=true' -q |
|
|
|
|
xargs docker rmi
|
|
|
|
if [[ "${once}" == 1 ]]; then
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
for i in {0..9}; do
|
|
|
|
echo -n z
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2020-06-29 15:22:21 +00:00
|
|
|
export NVM_DIR="${HOME}/.nvm"
|
|
|
|
|
2017-06-13 14:33:29 +00:00
|
|
|
__maybesource ~/.zshenv
|
|
|
|
__maybesource ~/google-cloud-sdk/path.zsh.inc
|
|
|
|
__maybesource ~/google-cloud-sdk/completion.zsh.inc
|
2019-05-13 13:45:12 +00:00
|
|
|
__maybesource /usr/share/nvm/init-nvm.sh silent
|
|
|
|
__maybesource /usr/local/opt/nvm/nvm.sh silent
|
2020-08-17 02:30:03 +00:00
|
|
|
__maybesource "${NVM_DIR}/nvm.sh"
|
2017-07-09 01:06:59 +00:00
|
|
|
__maybesource ~/.kiex/scripts/kiex
|
2020-03-26 13:47:53 +00:00
|
|
|
__maybesource ~/.config/tabtab/__tabtab.zsh
|
2020-08-17 02:30:03 +00:00
|
|
|
__maybesource ~/.sdkman/bin/sdkman-init.sh
|
2017-06-13 14:33:29 +00:00
|
|
|
|
|
|
|
if [[ -f ~/perl5/lib/perl5/local/lib.pm ]]; then
|
|
|
|
eval "$(perl -I ~/perl5/lib/perl5 '-Mlocal::lib')"
|
|
|
|
fi
|
|
|
|
|
2020-03-26 13:47:53 +00:00
|
|
|
if [[ -d /usr/local/opt/python@3.8/lib ]]; then
|
|
|
|
export LDFLAGS="-L/usr/local/opt/python@3.8/lib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -d /usr/local/opt/python@3.8/lib/pkgconfig ]]; then
|
|
|
|
export PKG_CONFIG_PATH="/usr/local/opt/python@3.8/lib/pkgconfig"
|
|
|
|
fi
|
|
|
|
|
2019-05-13 13:45:12 +00:00
|
|
|
if nvm &>/dev/null; then
|
2022-04-28 20:22:38 +00:00
|
|
|
nvm use --delete-prefix 16 --silent
|
2019-05-13 13:45:12 +00:00
|
|
|
fi
|
|
|
|
|
2020-02-19 03:37:49 +00:00
|
|
|
if kitty --version &>/dev/null; then
|
|
|
|
autoload -Uz compinit
|
|
|
|
compinit
|
|
|
|
kitty + complete setup zsh | source /dev/stdin
|
|
|
|
fi
|
|
|
|
|
2017-06-06 12:18:54 +00:00
|
|
|
true
|