-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefault.sh
56 lines (48 loc) · 1.27 KB
/
default.sh
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
# ------------------------------
# Default shell configuration
# ------------------------------
#
# set prompt
#
autoload colors
colors
setopt prompt_subst
case ${UID} in
0)
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_"
PROMPT="%B%{[36m%}[%n@%m]#%{[m%}%b "
PROMPT2="%B%{[31m%}%_#%{[m%}%b "
RPROMPT="%{[36m%}(`rprompt_git_current_branch`%{[36m%}%~%)%{[m%}"
SPROMPT="%B%{[31m%}%r is correct? [n,y,a,e]:%{${reset_color}%}%b "
[ -n "${REMOTEHOST}${SSH_CONNECTION}" ] &&
PROMPT="%{${fg[white]}%}${HOST%%.*} ${PROMPT}"
;;
*)
PROMPT="%{[36m%}[%n@%m]%%%{[m%} "
PROMPT2="%{[31m%}%_%%%{[m%} "
RPROMPT='%{[36m%}(`rprompt_git_current_branch`%{[36m%}%~%)%{[m%}'
SPROMPT="%{[31m%}%r is correct? [n,y,a,e]:%{${reset_color}%} "
[ -n "${REMOTEHOST}${SSH_CONNECTION}" ] &&
PROMPT="%{${fg[white]}%}${HOST%%.*} ${PROMPT}"
;;
esac
# auto change directory
#
setopt auto_cd
# auto directory pushd that you can get dirs list by cd -[tab]
#
setopt auto_pushd
# command correct edition before each completion attempt
#
setopt correct
# compacked complete list display
#
setopt list_packed
# no remove postfix slash of command line
#
setopt noautoremoveslash
# no beep sound when complete list displayed
#
setopt nolistbeep
# reporttime
export REPORTTIME=5