-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
executable file
·48 lines (36 loc) · 1.02 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
# Load exports and aliases
for file in $HOME/.{exports,aliases,functions,shell_extra}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
# Zsh specific aliases
alias reload=". $HOME/.zshrc && echo 'ZSH config reloaded from $HOME/.zshrc'"
# Completions {{{
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:${FPATH}
if [ -d $(brew --prefix)/share/zsh-completions ]; then
FPATH=$(brew --prefix)/share/zsh-completions:${FPATH}
fi
fi
autoload -Uz compinit
compinit
setopt correctall # command correction
# Symfony2 console completion script
source ~/.sfconsole/console_completion.sh
# }}}
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# NVM
autoload -U add-zsh-hook
add-zsh-hook chpwd load-nvmrc
load-nvmrc
# Detect dark mode
add-zsh-hook preexec detect-dark-mode
# Bindings {{{
bindkey '^R' history-incremental-pattern-search-backward
# }}}
# Initialise Starship
eval "$(starship init zsh)"
# Lastly the direnv hook
if type direnv &> /dev/null; then
eval "$(direnv hook bash)"
fi