-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
68 lines (56 loc) · 1.47 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
if type -p fzf >&/dev/null; then
source <(fzf --zsh)
fi
# Allow comments even in interactive shells.
setopt interactivecomments
if [[ -d ~/.zsh/functions ]]; then
fpath=( ~/.zsh/functions "${fpath[@]}" )
autoload -Uz gicl
autoload -Uz gisbo
autoload -Uz mkcd
autoload -Uz wttr
fi
# Enable Git completions;
# see https://git-scm.com/book/en/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Zsh
autoload -Uz compinit && compinit
#
# Setup Git prompt
f=$HOMEBREW_PREFIX/etc/bash_completion.d/git-prompt.sh
if [ -n "$f" ]; then
source "$f"
setopt PROMPT_SUBST
PS1='[%c$(__git_ps1 " (%s)")]\$ '
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
fi
unset f
# Stop backward-kill-word (M-DEL) on path delimiter ('/').
autoload -U select-word-style
select-word-style bash
# Add `help` command à la Bash.
# See https://superuser.com/a/1563859
unalias run-help
autoload run-help
if [ -n "$HOMEBREW_PREFIX" ]; then
HELPDIR=$(brew --prefix)/share/zsh/help
else
HELPDIR=/usr/share/zsh/${ZSH_VERSION}/help
fi
alias help=run-help
if type -p nvim >&/dev/null; then
export EDITOR=nvim
fi
# Emacs key bindings; see zshzle(1).
bindkey -e
if type -p direnv >&/dev/null; then
eval "$(direnv hook zsh)"
fi
#XXX if type -p zoxide >&/dev/null; then
#XXX eval "$(zoxide init zsh)"
#XXX fi
if type -p starship >&/dev/null; then
eval "$(starship init zsh)"
fi
if type -p atuin >&/dev/null; then
eval "$(atuin init zsh --disable-up-arrow)"
fi