-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc.tmpl
63 lines (50 loc) · 2.06 KB
/
dot_zshrc.tmpl
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
export DOT_FILES=~/.dotfiles
# Aliases and functions
if [ -f "$DOT_FILES/common.sh" ]; then source "$DOT_FILES/common.sh"; fi
# Antidote setup.
{{- if eq .chezmoi.os "darwin" }}
source $(brew --prefix)/opt/antidote/share/antidote/antidote.zsh
{{- else if eq .chezmoi.os "linux" }}
source /home/wzt/.antidote/antidote.zsh
{{- end }}
antidote load
setopt sharehistory
bindkey '^[[Z' reverse-menu-complete
export COMPLETION_WAITING_DOTS="true";
zstyle :prompt:pure:git:stash show yes
autoload -Uz compinit
compinit
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
if [[ -n ${ZDOTDIR:-${HOME}}/.zcompdump(#qN.mh+24) ]]; then
compinit -d ~/.zcompdump;
else
compinit -C;
fi;
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# Edit shell commands in vim
autoload -U edit-command-line
zle -N edit-command-line
bindkey '\C-x\C-e' edit-command-line
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/11/bin
eval "$(starship init zsh)"
eval "$(zoxide init zsh --cmd j)"
export GOPATH="$HOME/dev"; export GOROOT="$HOME/.go"; export PATH="$GOPATH/bin:$PATH"; # g-install: do NOT edit, see https://github.com/stefanmaric/g
alias ggovm="$GOPATH/bin/g"; # g-install: do NOT edit, see https://github.com/stefanmaric/g
{{ if eq .chezmoi.os "linux" -}}
FNM_PATH="/home/wzt/.local/share/fnm"
if [ -d "$FNM_PATH" ]; then
export PATH="/home/wzt/.local/share/fnm:$PATH"
eval "`fnm env --use-on-cd`"
fi
{{- end }}
eval "$(fnm env --use-on-cd)"
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"