-
Notifications
You must be signed in to change notification settings - Fork 3
/
_zshrc
122 lines (86 loc) · 2.57 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# .zshrc
##
# General
##
setopt PROMPT_SUBST # enable prompt expansions
export CLICOLOR=1
##
# Append fpath
##
fpath=( $fpath ~/.zsh/functions )
if type brew &>/dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
##
# History
##
HISTSIZE=50000 # number of histories the shell will keep within one session
SAVEHIST=100000 # the number of lines of history to save
HISTFILE=$HOME/.zhistory
setopt APPEND_HISTORY # append history list to the history file, rather than replace it
setopt HIST_EXPIRE_DUPS_FIRST # drop duplicate histories first when hitting the history size limit
setopt EXTENDED_HISTORY # save each command’s beginning timestamp and duration to history
setopt HIST_IGNORE_SPACE
setopt HIST_VERIFY
setopt INC_APPEND_HISTORY # append entries to the history file as soon as they are entered
setopt SHARE_HISTORY
##
# antibody
##
source <(antibody init)
bundles=(
mafredri/zsh-async
zdharma/fast-syntax-highlighting
zsh-users/zsh-completions
zsh-users/zsh-autosuggestions
zsh-users/zsh-history-substring-search
psprint/zsh-navigation-tools
zdharma/history-search-multi-word
jreese/zsh-titles
marcoy/zsh-gitfast
paulirish/git-open
conda-incubator/conda-zsh-completion
spwhitt/nix-zsh-completions
# chisui/zsh-nix-shell # Using direnv with `use nix` in a .envrc instead
'robbyrussell/oh-my-zsh path:plugins/docker'
'robbyrussell/oh-my-zsh path:plugins/docker-compose'
sobolevn/wakatime-zsh-plugin
)
# Manually add oh-my-zsh/plugins/docker/_docker to fpath
# https://stackoverflow.com/a/45406609
fpath+=($(antibody home)/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh/plugins/docker)
antibody bundle < <(print -l $bundles)
##
# Completions
##
autoload -U compinit && compinit
zstyle ':completion:*' menu select
##
# Zle
##
WORDCHARS='?_'
##
# zsh-users/zsh-history-substring-search
##
HISTORY_SUBSTRING_SEARCH_FUZZY=true # "ab c" will match "*ab*c*""
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=true # only return unique search results
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
##
# zdharma/fast-syntax-highlighting
##
FAST_HIGHLIGHT_STYLES[unknown-token]='fg=red'
##
# Enable prompt
##
autoload -U promptinit; promptinit
[[ "$SSH_CONNECTION" != '' ]] && PURE_PROMPT_SYMBOL='⋯ ❯' || PURE_PROMPT_SYMBOL='❯'
prompt pure
##
# Load Shared Profile
##
. "$HOME/.shell_profile"