-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
80 lines (65 loc) · 1.42 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
#
# Basic Settings
#
# 256Colors
export TERM='xterm-256color'
autoload colors
colors
color_prompt=yes
# Basic
export PATH=$HOME/local/bin:$HOME/local/sbin:$HOME/bin:$PATH
export LANG=ja_JP.UTF-8
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Autocomplete
LISTMAX=0
autoload -Uz compinit
compinit -u
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# History
HISTFILE=~/.histories
HISTSIZE=10000
SAVEHIST=10000
setopt extended_history
# Terminal
case "${TERM}" in
kterm*|xterm)
precmd() {
echo -ne "\033]0;${USER}@${HOST%%.*}:${PWD}\007"
}
;;
esac
# Fix nomatch (GLOB fix)
setopt nonomatch
setopt EXTENDED_GLOB
# Fix delete, home, end keys
# thanks to http://gry.sakura.ne.jp/2009/06/08/183/
bindkey -e
bindkey "^?" backward-delete-char
bindkey "^H" backward-delete-char
bindkey "^[[3~" delete-char
bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line
# Incremental-pattern-search
# thanks to http://subtech.g.hatena.ne.jp/secondlife/20110222/1298354852
bindkey '^R' history-incremental-pattern-search-backward
bindkey '^S' history-incremental-pattern-search-forward
#
# Include external config files
#
# Env
source ~/dotfiles/zsh/env
# Alias
source ~/dotfiles/zsh/alias
# By OS type
case "${OSTYPE}" in
darwin*)
source ~/dotfiles/zsh/osx
;;
esac
# Prompt
source ~/dotfiles/zsh/prompt
# Starship
source ~/dotfiles/zsh/starship
# By Local (if exists)
[ -f ~/.zshrc.local ] && source ~/.zshrc.local