-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_zshrc
59 lines (51 loc) · 2.73 KB
/
dot_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
export HISTSIZE=1000000
export SAVEHIST=1000000
setopt always_to_end # Move cursor to end of the word an completion
setopt append_history # Append to history file
setopt auto_cd # cd automatically on directory name
setopt auto_list # List choices on an ambiguous completion
setopt complete_in_word # Keep cursor where it is during completion
setopt extended_glob # Treat the #, ~ and ^ as part of patterns for filename generation
setopt extended_history # Save command timestamp in history file
setopt glob_complete # Cycle through glob patterns
setopt hist_expire_dups_first # Expire duplicate entries first when trimming history
setopt hist_find_no_dups # Do not display a line previously found
setopt hist_ignore_dups # Don't record an entres that was just recorded again
setopt hist_ignore_space # Don't record an entries starting with a space
setopt hist_reduce_blanks # Remove superfluous blanks before recording entry
setopt hist_verify # Don't execute immediately upon history expansion.
setopt inc_append_history # Write to the history file immediately, not when the shell exits
setopt menu_complete # On an ambiguous completion, insert the first match immediately
setopt no_auto_remove_slash # Do not remove the auto completed slash
setopt no_beep # No beeps please
setopt no_case_glob # Case insensitive globbing
setopt no_correct_all # Do not correct spelling
setopt no_list_beep # No beeps please
setopt share_history # Share history between all sessions
[ -d ~/.zsh/completion ] && fpath=(~/.zsh/completion $fpath)
# https://github.com/zimfw/zimfw
[ -f ~/.sh/zim ] && source ~/.sh/zim
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
autoload -U +X bashcompinit && bashcompinit
# sensible ctrl-w/u & alt arrow behaviour
autoload -U select-word-style
select-word-style bash
bindkey \^U backward-kill-line
[ -f ~/.sh/path ] && source ~/.sh/vars
[ -f ~/.sh/path ] && source ~/.sh/path
[ -f ~/.sh/proxy ] && source ~/.sh/proxy
[ -e ~/.sh/work ] && source ~/.sh/work
[ -f ~/.sh/private ] && source ~/.sh/private
[ -f ~/.sh/functions ] && source ~/.sh/functions
[ -f ~/.sh/$OS ] && source ~/.sh/$OS
[ -f ~/.sh/$SHELL ] && source ~/.sh/$SHELL
[ -f ~/.sh/tools ] && source ~/.sh/tools
[ -f ~/.sh/local ] && source ~/.sh/local
[ -f ~/.sh/aliases ] && source ~/.sh/aliases
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
alias clear-completion-cache='rm -f ~/.zcompdump; compinit'
alias history='fc -l 1'