-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathzshrc
More file actions
111 lines (92 loc) · 2.57 KB
/
zshrc
File metadata and controls
111 lines (92 loc) · 2.57 KB
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
# _____________________________/\\\___________________________________
# ____________________________\/\\\___________________________________
# ____________________________\/\\\___________________________________
# __/\\\\\\\\\\\__/\\\\\\\\\\_\/\\\__________/\\/\\\\\\\____/\\\\\\\\_
# _\///////\\\/__\/\\\//////__\/\\\\\\\\\\__\/\\\/////\\\_/\\\//////__
# ______/\\\/____\/\\\\\\\\\\_\/\\\/////\\\_\/\\\___\///_/\\\_________
# ____/\\\/______\////////\\\_\/\\\___\/\\\_\/\\\_______\//\\\________
# __/\\\\\\\\\\\__/\\\\\\\\\\_\/\\\___\/\\\_\/\\\________\///\\\\\\\\_
# _\///////////__\//////////__\///____\///__\///____________\////////_
# =============================================================================
# Set the zsh root directoy
export ZSH_ROOT=$HOME/.zsh
# Using fzf
if [ ! -f ~/.fzf.zsh ]; then
# install fzf
function _install_fzf() {
confirm y "fzf is not installed. Start installation ? "
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
}
install_fzf=true
else
source ~/.fzf.zsh
install_fzf=false
fi
export FZF_COMPLETION_TRIGGER=''
# Set some environmet variables
source "$ZSH_ROOT/functions/environment.zsh"
# dircolors
eval $(dircolors "$ZSH_ROOT/dircolors/dircolors-zenburn")
# tmux plugin should be loaded as much as first of zshrc.
# Only run if tmux is actually installed.
hash tmux 2>/dev/null && source "$ZSH_ROOT/functions/tmux.zsh"
# Use zgen to load some zsh plugins
#source "$ZSH_ROOT/functions/zgen.zsh"
# zplug
source "$ZSH_ROOT/functions/zplug.zsh"
export ZSH=$HOME/.zsh
# Add fpath for completions
# There are completion functions named like '_function'.
fpath=($ZSH_ROOT/completions $fpath)
source "$ZSH_ROOT/functions/completion.zsh"
# autoload -U compinit -D
# compinit
# Load custom plugins
while read myfunction; do
source "$ZSH_ROOT/functions/${myfunction}.zsh"
done < <(cat << EOF
alias
history
colorize
command-not-found
confirm
extract
fkill
git
less
ls
man
ranger
shtest
peco-history
bindkey
termsupport
prompt
pyenv
google-cloud-sdk
awscli
EOF
)
unset -v myfunction
# perform implicit tees or cats when multiple redirections are attempted
setopt multios
# installation and setups (if needed)
if ${install_fzf}; then
_install_fzf
unfunction _install_fzf
fi
unset install_fzf
# User specific configuration
[ -f "$ZSH_ROOT/rc.mine" ] && source "$ZSH_ROOT/rc.mine"
# zprof
# -----
# If you want to activate profiling, comment in `~/.zshenv`.
#
# ```~/.zshenv
# zmodload zsh/zprof && zprof
# ```
if (which zprof > /dev/null); then
zprof | less
fi
# vim: set ft=zsh