-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.my_plugins
127 lines (104 loc) · 2.76 KB
/
.my_plugins
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
# homebrew
if [[ -s "/opt/homebrew/bin/brew" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)";
fpath=($(brew --prefix)/share/zsh/site-functions $fpath)
fi
# hub CLI
if which hub > /dev/null; then
eval "$(hub alias -s)";
fi
# pyenv
if which pyenv > /dev/null; then
export PYENV_ROOT="$HOME/.pyenv";
export PATH="$PYENV_ROOT/bin:$PATH";
eval "$(pyenv init --path)";
eval "$(pyenv init -)";
fi
# nvm
if [[ -s "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" ]]; then
source "$HOMEBREW_PREFIX/opt/nvm/nvm.sh";
export NVM_DIR="$HOME/.nvm";
mkdir -p $NVM_DIR;
fi
if [[ -s "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" ]]; then
source "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm";
fi
# nodenv
if which nodenv > /dev/null; then
eval "$(nodenv init -)"
fi
# rbenv
if which rbenv > /dev/null; then
eval "$(rbenv init -)";
fi
# direnv
if which direnv > /dev/null; then
eval "$(direnv hook zsh)";
fi
# k3d
if which k3d > /dev/null; then
eval "$(k3d completion zsh)";
fi
# deno
if which deno > /dev/null; then
export PATH=$HOME/.deno/bin:$PATH;
fi
# haskell stack
if which stack > /dev/null; then
eval "$(stack --bash-completion-script stack)";
fi
# anyenv
if which anyenv > /dev/null; then
alias getanyenv='eval "$(anyenv init -)"';
fi
# GCloud CLI Auto Completion
if [[ -s "$HOME/gcloud/path.zsh.inc" ]]; then
source "$HOME/gcloud/path.zsh.inc";
fi
if [[ -s "$HOME/gcloud/completion.zsh.inc" ]]; then
source "$HOME/gcloud/completion.zsh.inc";
fi
# App Engine
if [[ -e "$HOME/gcloud/platform/google_appengine" ]]; then
export PATH="$HOME/gcloud/platform/google_appengine:$PATH";
fi
# ghcup-env
if [[ -s "$HOME/.ghcup/env" ]]; then
source "$HOME/.ghcup/env";
fi
#zsh-syntax-highlight
if [[ -s "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then
source "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh";
fi
#zsh-autosuggestions
if [[ -s "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ]]; then
export ZSH_AUTOSUGGEST_STRATEGY=(completion history)
source "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh";
fi
# merknife
if which merknife > /dev/null; then
eval "$(merknife completion zsh)";
fi
# fzf
if which fzf > /dev/null; then
source <(fzf --zsh)
fi
# zoxide
if which zoxide > /dev/null; then
eval "$(zoxide init zsh --cmd j)";
fi
# beyond-cli
if which beyond > /dev/null; then
source <(beyond completion zsh);
compdef _beyond beyond;
fi
# chatgpt-cli
if [[ -s "$HOMEBREW_PREFIX/bin/chatgpt" ]]; then
if alias chatgpt &> /dev/null; then
unalias chatgpt
fi
mkdir -p $HOME/.chatgpt-cli/history
export OPENAI_CONFIG_HOME=$HOME/.chatgpt-cli
export OPENAI_DATA_HOME=$HOME/.chatgpt-cli/history
eval "$(chatgpt --set-completions zsh)"
fi