-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
60 lines (47 loc) · 1.65 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
## Settings for umask
#if (( EUID == 0 )); then
# umask 002
#else
# umask 022
#fi
## ctrl-s will no longer freeze the terminal.
stty erase "^?"
## use the vi navigation keys (hjkl) besides cursor keys in menu completion
#bindkey -M menuselect 'h' vi-backward-char # left
#bindkey -M menuselect 'k' vi-up-line-or-history # up
#bindkey -M menuselect 'l' vi-forward-char # right
#bindkey -M menuselect 'j' vi-down-line-or-history # bottom
## set command prediction from history, see 'man 1 zshcontrib'
is4 && zrcautoload predict-on && \
zle -N predict-on && \
zle -N predict-off && \
bindkey "^X^Z" predict-on && \
bindkey "^Z" predict-off
## press ctrl-q to quote line:
mquote () {
zle beginning-of-line
zle forward-word
# RBUFFER="'$RBUFFER'"
RBUFFER=${(q)RBUFFER}
zle end-of-line
}
zle -N mquote && bindkey '^q' mquote
## define word separators (for stuff like backward-word, forward-word, backward-kill-word,..)
#WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
#WORDCHARS=.
#WORDCHARS='*?_[]~=&;!#$%^(){}'
#WORDCHARS='${WORDCHARS:s@/@}'
#bindkey '\eq' push-line-or-edit
## add `|' to output redirections in the history
#setopt histallowclobber
## try to avoid the 'zsh: no matches found...'
#setopt nonomatch
## warning if file exists ('cat /dev/null > ~/.zshrc')
#setopt NO_clobber
## alert me if something failed
setopt printexitvalue
## changed completer settings
#zstyle ':completion:*' completer _complete _correct _approximate
#zstyle ':completion:*' expand prefix suffix
## another different completer setting: expand shell aliases
zstyle ':completion:*' completer _expand_alias _complete _approximate