-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
63 lines (45 loc) · 1.44 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
# set up antidote; plugins go in ~/.zsh-plugins
source ~/.zsh/init-antidote.zsh
# zle and keybindings
bindkey -e
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' # effectively, subword mode in zle
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
bindkey '^X^F' fuzzy-search-and-edit
# history
export HISTSIZE=1000000
export SAVEHIST=1000000
export HISTFILE=~/.history
setopt append_history
setopt extended_history
setopt hist_ignore_all_dups
setopt hist_reduce_blanks
# completion
if whence brew &> /dev/null; then
# assume other stuff is more right than brew-installed stuff
fpath+=$(brew --prefix)/share/zsh/site-functions
fi
if whence nix &> /dev/null; then
# assume nix-installed stuff is more right than other stuff
fpath=( ~/.nix-profile/share/zsh/site-functions $fpath )
fi
autoload -Uz compinit
compinit
# miscellaneous other options and things
setopt auto_pushd
setopt multios
setopt extended_glob
setopt interactive_comments
export PAGER=less
export EDITOR=vi
alias vi=vim
alias ls='ls -GF'
unalias run-help # https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#index-run_002dhelp_002c-use-of
autoload run-help
# direnv and starship
eval "$(direnv hook zsh)"
eval "$(starship init zsh)" # prompt magic is now in ~/.config/starship.toml
# trying out some emacs terminal stuff---needs to come after starship so it can tweak the prompt.
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]; then
source "$EAT_SHELL_INTEGRATION_DIR/zsh"
fi