-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc.tmpl
75 lines (59 loc) · 1.85 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
64
65
66
67
68
69
70
71
72
73
74
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
plugins=(
zsh-autosuggestions
zsh-syntax-highlighting
)
# Fix oh-my-zsh warning at shell start-up
# "Insecure completion-dependent directories detected"
ZSH_DISABLE_COMPFIX="true"
# Auto updates will cause the ~/.oh-my-zsh directory to drift out of sync with chezmoi's source state.
# To update Oh My Zsh and its plugins, refresh the downloaded archives.
DISABLE_AUTO_UPDATE="true"
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
{{- if eq .chezmoi.os "darwin" }}
# macOS settings
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=/opt/homebrew/bin:$PATH
if [ -d "$HOME/.asdf" ]; then
export PATH="$HOME/.asdf/shims:$PATH"
. $(brew --prefix asdf)/libexec/asdf.sh
fi
{{- else if eq .chezmoi.os "linux" }}
# linux settings
if [ -d "$HOME/.asdf" ]; then
export PATH="$HOME/.asdf/shims:$PATH"
fi
{{- end }}
# vim keybindings
bindkey -v
if command -v nvim >/dev/null 2>&1; then
export EDITOR=$(which nvim)
elif command -v vim >/dev/null 2>&1; then
export EDITOR=$(which vim)
fi
# shell functions
gpo() { git push origin $(git branch --show-current) }
# git aliases
alias gst="git status"
alias ga="git add"
alias gc="git commit"
alias glp="git log --pretty=oneline"
alias gd="git diff"
# gcloud aliases
alias gce="gcloud composer environments"
alias gbce="gcloud beta composer environments"
alias gs="gsutil"
# other
alias cz="chezmoi"
alias tf="terraform"
alias dc="docker-compose"