-
Notifications
You must be signed in to change notification settings - Fork 12
/
zshrc
78 lines (65 loc) · 1.99 KB
/
zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Tinty isn't able to apply environment variables to your shell due to
# the way shell sub-processes work. This is a work around by running
# Tinty through a function and then executing the shell scripts.
tinty_source_shell_theme() {
newer_file=$(mktemp)
tinty $@
subcommand="$1"
if [ "$subcommand" = "apply" ] || [ "$subcommand" = "init" ]; then
tinty_data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/tinted-theming/tinty"
while read -r script; do
# shellcheck disable=SC1090
. "$script"
done < <(find "$tinty_data_dir" -maxdepth 1 -type f -name "*.sh" -newer "$newer_file")
unset tinty_data_dir
fi
unset subcommand
}
if [ -n "$(command -v 'tinty')" ]; then
tinty_source_shell_theme "init" > /dev/null
alias tinty=tinty_source_shell_theme
fi
# Load direnv
if which direnv > /dev/null; then eval "$(direnv hook zsh)"; fi
# Load asdf
if which brew > /dev/null; then
. /opt/homebrew/opt/asdf/libexec/asdf.sh
else
if [[ -s "$HOME/.asdf/asdf.sh" ]]; then
. $HOME/.asdf/asdf.sh
fi
fi
# Google Cloud SDK
if (( $+commands[brew] )); then
export USE_GKE_GCLOUD_AUTH_PLUGIN=True
source "$HOMEBREW_PREFIX/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
source "$HOMEBREW_PREFIX/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
# Load homebrew completions
fpath=($fpath $HOMEBREW_PREFIX/share/zsh/site-functions)
fi
# Shellfish app onfig
test -e "$HOME/.shellfishrc" && source "$HOME/.shellfishrc"
alias a='tmux attach -t'
alias g='git'
alias v='nvim'
alias vim='nvim'
alias n='nvim'
alias t='tmux'
alias c='cd'
alias s='spring'
alias be='bundle exec'
alias gt='go test -v -cover $(go list ./... | grep -v vendor)'
alias mux='tmuxinator'
alias tf='terraform'
alias k='kubectl'
alias kx='kubectx'