-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
36 lines (28 loc) · 1.12 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
setopt PROMPT_SUBST
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
# https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
source ~/.git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWCOLORHINTS=true
GIT_PS1_SHOWUNTRACKEDFILES=true
precmd () {
__git_ps1 \
${_NEW_LINE-}"%F{black}%~%f" \
$'\n'"%F{magenta}${VIRTUAL_ENV##*/}${VIRTUAL_ENV+ }❯%f " \
" |%s"
[[ -v ${_NEW_LINE} ]] || _NEW_LINE=$'\n'
}
# https://github.com/zsh-users/zsh-autosuggestions
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# MUST BE AT THE END OF THE FILE !!!
# https://github.com/zsh-users/zsh-syntax-highlighting
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# MUST BE AFTER zsh-syntax-highlighting !!!
# https://github.com/zsh-users/zsh-history-substring-search
source ~/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
[[ -f ~/.aliases ]] && source ~/.aliases
[[ -f ~/.aliases_local ]] && source ~/.aliases_local