generated from chezmoi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc.tmpl
77 lines (63 loc) · 2.33 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
75
76
77
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="dracula-pro"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
zstyle ':omz:update' frequency 13
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(colorize cp direnv gh git git-commit git-prompt httpie kubectl mosh tmux transfer)
source $ZSH/oh-my-zsh.sh
export EDITOR=nvim
export ZSH_THEME_GIT_PROMPT_CACHE=yes
# User configuration
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
{{ if eq .chezmoi.os "linux" }}
PROMPT="%m ${PROMPT}"
# bun completions
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
{{ end }}
alias k=kubectl
alias n=nvim
alias n.="nvim ."
alias c=chezmoi
alias t=tmux
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
{{ if (eq .chezmoi.hostname "dev") }}
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
tmux attach -d || tmux new
fi
{{ end }}
{{- if (eq .chezmoi.os "linux" )}}
tmux-git-autofetch() {($HOME/.tmux/plugins/tmux-git-autofetch/git-autofetch.tmux --current &)}
add-zsh-hook chpwd tmux-git-autofetch
{{- end }}
{{- if (eq .chezmoi.os "darwin" )}}
# Updated SQLite3
export PATH="/usr/local/opt/sqlite/bin:$PATH"
export PATH="$HOME/.bun/bin:$PATH"
source <(fzf --zsh)
{{- end }}