-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
36 lines (24 loc) · 1.17 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
#!/bin/zsh
## This is the entrypoint of zsh config.
# First, source all shell agnostic config.
source $DOT_FILES/.shellrc
# Then, do zsh specific things.
bindkey -v
setopt APPEND_HISTORY # append instead of replace, all zshells do that
setopt INC_APPEND_HISTORY # save after every command instead of on exit
setopt EXTENDED_HISTORY # save time and run time length
setopt HIST_EXPIRE_DUPS_FIRST # expire duplicates first when expiring old history
export HISTSIZE=10000 # num of commands loaded into memory
export SAVEHIST=50000 # num of commands saved in the file
export HISTFILE="$XDG_STATE_HOME"/zsh/history
setopt GLOB_DOTS # includes .* files in *
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # case insensitive tab completion
autoload -U compinit && compinit
autoload -U promptinit && promptinit
autoload -U colors && colors
eval "$(starship init zsh)"
bindkey "^?" backward-delete-char # Allow backspace to delete stuff in prompt insert mode
# Do reverse history search with control-R, like in bash
bindkey "^R" history-incremental-search-backward
# Caveat from brew install zsh-autosuggestions:
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh