-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
136 lines (106 loc) · 3.83 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Path to your oh-my-zsh configuration.
#ZSH=$HOME/.oh-my-zsh
#
ZSH=$HOME/.zprezto
source $ZSH/init.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="cloud"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# 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=13
# 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"
# 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)
plugins=(git grunt)
#source $ZSH/oh-my-zsh.sh
alias gg="git grep -n"
rgrep() { grep -r -n "$1" . }
# The next line updates PATH for the Google Cloud SDK.
if [ -f /Users/svenwiden/google-cloud-sdk/path.zsh.inc ]; then
source '/Users/svenwiden/google-cloud-sdk/path.zsh.inc'
fi
# The next line enables shell command completion for gcloud.
if [ -f /Users/svenwiden/google-cloud-sdk/completion.zsh.inc ]; then
source '/Users/svenwiden/google-cloud-sdk/completion.zsh.inc'
fi
# Customize to your needs...
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/go/bin:./node_modules/.bin/:/Users/svenwiden/bin:/Users/svenwiden/.asdf/installs/elixir/1.9/.mix/escripts:$PATH
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export GOPATH=$HOME/go
export EDITOR=vim
# The next line enables bash completion for gcloud.
source '/Users/svenwiden/google-cloud-sdk/completion.zsh.inc'
alias kc=kubectl
# kubectl
function c() {
kubectl config use-context $1
}
function _c() {
local cur kubectl_out
cur=${COMP_WORDS[COMP_CWORD]}
if kubectl_out=$(kubectl config get-contexts -o name 2>/dev/null); then
COMPREPLY=( $( compgen -W "${kubectl_out[*]}" -- "$cur" ) )
fi
}
complete -F _c c
eval $(kubectl completion zsh)
#
# Jump
# https://github.com/gsamokovarov/jump#installation
#
eval "$(jump shell zsh)"
eval "$(starship init zsh)"
## Appends every command to the history file once it is executed
#setopt inc_append_history
## Reloads the history whenever you use it
#setopt share_history
#HISTFILE=~/.zsh_history
export GITHUB_ACTOR=$(git config user.name)
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/local/bin/terraform terraform
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# GCLOUD kubectl plugin
export USE_GKE_GCLOUD_AUTH_PLUGIN=True
export KUBE_CONFIG_PATH=~/.kube/config
#compdef gt
###-begin-gt-completions-###
#
# yargs command completion script
#
# Installation: gt completion >> ~/.zshrc
# or gt completion >> ~/.zprofile on OSX.
#
_gt_yargs_completions()
{
local reply
local si=$IFS
IFS=$'
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" gt --get-yargs-completions "${words[@]}"))
IFS=$si
_describe 'values' reply
}
compdef _gt_yargs_completions gt
###-end-gt-completions-###