-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_zshrc
More file actions
61 lines (49 loc) · 1.3 KB
/
dot_zshrc
File metadata and controls
61 lines (49 loc) · 1.3 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
export TERM="xterm-256color"
eval `dircolors "$HOME/.dircolors"`
# oh-my-zsh
ZSH="$HOME/.oh-my-zsh"
ZSH_CACHE_DIR="$HOME/.oh-my-zsh-cache"
ZSH_THEME="qupeng"
DISABLE_AUTO_UPDATE="true"
CASE_SENSITIVE="true"
[ ! -d $ZSH_CACHE_DIR ] && mkdir $ZSH_CACHE_DIR
plugins=(zsh-completions zsh-syntax-highlighting rust git)
source "$ZSH/oh-my-zsh.sh"
unsetopt AUTO_CD # disable auto_cd when type dirname
autoload -U compinit
compinit
# key maps and alias
bindkey '^_[[Z' reverse-menu-complete
alias rm="rm -i"
alias ls="ls -h --color=auto"
alias ll="ls -l"
alias gg="exit"
alias tmux="tmux -u"
bins=("$HOME/.local/bin" "$HOME/.cargo/bin" "$HOME/.go/bin")
for bin in ${bins[@]}; do
if [ -d $bin ] && [ ! `echo $PATH|grep $bin` ]; then
export PATH=$bin:$PATH
fi
done
# for pyenv.
export PYENV_ROOT="$HOME/.pyenv"
if [ -d "$HOME/.pyenv" ]; then
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - zsh)"
fi
fg() {
if [ $# -eq 1 && $1 == - ]; then
builtin fg %-
else
builtin fg %"$@"
fi
}
bg() {
if [ $# -eq 1 && $1 == - ]; then
builtin bg %-
else
builtin bg %"$@"
fi
}
export RUSTUP_UPDATE_ROOT=https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup
export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup