-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
88 lines (77 loc) · 1.63 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
#source /etc/profile
source ~/.profile
. ~/.zsh/mouse.zsh
zle-toggle-mouse
autoload -U compinit
compinit
autoload -U incremental-complete-word
zle -N incremental-complete-word
autoload -U insert-files
zle -N insert-files
autoload -U predict-on
zle -N predict-on
zle -N predict-off
bindkey "^X^A" predict-on # C-x C-z
#bindkey "^S" predict-off # C-z
autoload zmv
# $PROMPT style
fpath=(~/.zsh/functions $fpath)
autoload -U promptinit
promptinit
prompt lazy
source ~/.zsh/env.sh
source ~/.zsh/comp.zsh
source ~/.zsh/bindkey.zsh
source ~/.zsh/functions.sh
source ~/.zsh/shell.alias
preexec() {
[[ -t 1 ]] || return
case $TERM in
*xterm*|*rxvt*|(dt|k|E)term*) print -Pn "\e]2;<$1> [%~]\a"
;;
esac
}
# csh compatibility
setenv() {
typeset -x "${1}${1:+=}${(@)argv[2,$#]}"
}
freload() {
while (( $# )); do; unfunction $1; autoload -U $1; shift; done
}
typeset -U path cdpath fpath manpath
HISTFILE=~/.zhistory
SAVEHIST=7770
HISTSIZE=777
DIRSTACKSIZE=20
setopt APPEND_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_REDUCE_BLANKS
setopt No_Beep
#[[ $EMACS = t ]] && unsetopt zle
case "$TERM" in
dumb)
unsetopt zle
unsetopt prompt_cr
unsetopt prompt_subst
unfunction precmd
unfunction preexec
PS1='$ '
;;
eterm-color)
# unsetopt zle
# unsetopt prompt_cr
# unsetopt prompt_subst
unfunction precmd
unfunction preexec
RPS1=''
;;
screen*)
;;
xterm)
test -z "$SSH_CLIENT" && tmux
;;
*)
tmux
;;
esac