-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
executable file
·94 lines (73 loc) · 2.01 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
# LANG
export LANG=ja_JP.UTF-8
# prompt
autoload -Uz colors
colors
case ${UID} in
0)
PROMPT="%B%{${fg[green]}%}%/#%{${reset_color}%}%b "
PROMPT2="%B%{${fg[green]}%}%_#%{${reset_color}%}%b "
SPROMPT="%B%{${fg[green]}%}%r is correct? [n,y,a,e]:%{${reset_color}%}%b "
[ -n "${REMOTEHOST}${SSH_CONNECTION}" ] &&
PROMPT="%{${fg[white]}%}${HOST%%.*} ${PROMPT}"
;;
*)
PROMPT="%{${fg[green]}%}%/%%%{${reset_color}%} "
PROMPT2="%{${fg[green]}%}%_%%%{${reset_color}%} "
SPROMPT="%{${fg[green]}%}%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
setopt auto_pushd
setopt pushd_ignore_dups
# command correct edition before each completion attempt
setopt correct
# compacked complete list display
setopt list_packed
# do not remove postfix slash of command line
setopt noautoremoveslash
# no beep
setopt no_beep
# emacs like key
bindkey -d
bindkey -e
# command history
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
setopt share_history
# completion
autoload -Uz compinit
compinit
zstyle ':completeion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' format '%B%d%b'
zstyle ':completeion:*' group-name ''
zstyle ':completion:*:default' menu select=2
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' use-cache yes
zstyle ':completion:sudo:*' environ PATH="$SUDO_PATH:$PATH"
zstyle ':completion:*' ignore-parents parent pwd ..
setopt complete_in_word
# 日本語を表示可能に
setopt print_eight_bit
# Ctrl + D で zsh を終了しない
setopt ignore_eof
# '#' 以降をコメントとして扱う
setopt interactive_comments
setopt complete_aliases
alias ll='ls --color=auto -al'
alias vi='vim'
setopt auto_param_slash
setopt mark_dirs
setopt list_types
setopt auto_menu
setopt auto_param_keys
setopt no_flow_control
export TERM=xterm-256color