-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
103 lines (85 loc) · 3.72 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
# zshrc
# vim:set ft=zsh et ts=4 sw=4:
[[ -f "$HOME/.zshenv" ]] && source "$HOME/.zshenv" # Not sourced on login
export ZSH="${ZSH:-$HOME/.oh-my-zsh}"
export DFS="${DFS:-$HOME/dotfiles}"
if [[ -x "${commands[git]}" ]]; then
plugins+=git
typeset -AU github_repos
github_repos=(
# Local Destination # Github Page
"$DFS" 'joshtch/dotfiles'
"$HOME/.tmux/plugins/tpm" 'tmux-plugins/tpm'
"$ZSH" 'robbyrussell/oh-my-zsh'
"$ZSH/custom/dircolors-solarized" 'seebi/dircolors-solarized'
"$ZSH/custom/history-substring-search" 'zsh-users/zsh-history-substring-search'
"$ZSH/custom/syntax-highlighting" 'zsh-users/zsh-syntax-highlighting'
"$ZSH/custom/plugins/alias-tips" 'djui/alias-tips'
"$ZSH/custom/plugins/deer" 'Vifon/deer'
"$ZSH/custom/plugins/docker-aliases" 'webyneter/docker-aliases'
"$ZSH/custom/plugins/zsh-completions" 'zsh-users/zsh-completions'
#"$ZSH/custom/plugins/expand-ealias.plugin.zsh" 'zigius/expand-ealias.plugin.zsh'
"$ZSH/custom/plugins/zsh-auto-virtualenv" 'tek/zsh-auto-virtualenv'
)
github_url="https://github.com"
for plugin_dir in ${(@ko)github_repos}; do
if ! [[ -d "$plugin_dir" ]]; then
git clone -q --depth=1 --recursive "${github_url}/${github_repos[$plugin_dir]}" "${plugin_dir}"
fi
done
function update_plugins() {
for plugin_dir in "${(@k)git_plugins}"; do
( cd "${plugin_dir}" && git pull -q --recurse-submodules=yes ) ||
git clone -q --depth=1 --recursive "${github_repos[$plugin_dir]}" "${plugin_dir}"
done
}
fi
ZSH_THEME='nicoulaj'
plugins+=(
alias-tips #expand-ealias #globalias
copybuffer
deer
extract
history
pip python
safe-paste
systemadmin
urltools web-search
zsh-navigation-tools zsh-completions
)
#plugins+=(adb nmap ruby singlechar sudo systemadmin xcode zsh-auto-virtualenv)
[[ -x "${commands[autoenv]}" ]] && plugins+=autoenv
[[ -x "${commands[git]}" ]] && plugins+=git
[[ -x "${commands[rustc]}" ]] && plugins+=rust \
&& [[ -f "$HOME/.cargo/env" ]] && path+="$HOME/.cargo/env"
[[ -x "${commands[tmux]}" ]] && plugins+=tmux
[[ -x "${commands[pass]}" ]] && plugins+=pass
[[ -x "${commands[yarn]}" ]] && plugins+=yarn
[[ -x "${commands[yarn]}" ]] && plugins+=docker && plugins+=docker-aliases
[[ -e "${/usr/local/opt/resty/share/resty/resty}" ]] && \
source /usr/local/opt/resty/share/resty/resty
plugins+=ssh-agent
zstyle :omz:plugins:ssh-agent agent-forwarding on
if [[ `uname` == 'Darwin' ]]; then
if [ "$TERM_PROGRAM" = 'iTerm.app' ]; then
ITERM2_INTEGRATION="${HOME}/.iterm2_shell_integration.zsh"
(
[[ -f "$ITERM2_INTEGRATION" ]] || \
curl -L https://iterm2.com/misc/zsh_startup.in -o "$ITERM2_INTEGRATION"
) && source "$ITERM2_INTEGRATION"
fi
plugins+=osx
[[ -x "${commands[brew]}" ]] && plugins+=brew && \
if brew command command-not-found-init > /dev/null 2>&1; then \
eval "$(brew command-not-found-init)"; fi
fi
source "$ZSH/oh-my-zsh.sh"
[[ -f "$DFS/aliases.zsh" ]] && source "$DFS/aliases.zsh"
[[ -f "$HOME/.localrc.zsh" ]] && source "$HOME/.localrc.zsh"
[[ -d "$ZSH/custom/syntax-highlighting" ]] && \
source "$ZSH/custom/syntax-highlighting/zsh-syntax-highlighting.zsh"
[[ -d "$ZSH/custom/history-substring-search" ]] && \
source "$ZSH/custom/history-substring-search/zsh-history-substring-search.zsh"
# This freezes Zsh's terminal state, so flow control works as normal after
# terminal apps crash
ttyctl -f