-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_zshrc.tmpl
More file actions
52 lines (40 loc) · 1.48 KB
/
dot_zshrc.tmpl
File metadata and controls
52 lines (40 loc) · 1.48 KB
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
# ============================================================================
# Shared Configuration
# ============================================================================
# Homebrew completions (must be before compinit)
if type brew &>/dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi
# Completion
autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
# NVM
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# direnv
export DIRENV_LOG_FORMAT=
eval "$(direnv hook zsh)"
# zoxide
eval "$(zoxide init zsh)"
# Starship prompt
eval "$(starship init zsh)"
# ghostty set tab title to pwd
function set_terminal_title() {
[[ -n "$GHOSTTY_RESOURCES_DIR" ]] && print -Pn '\e]0;%1~\a'
}
precmd_functions+=(set_terminal_title) # set title on term startup
chpwd_functions+=(set_terminal_title) # set title on change dir
function nvim() {
command nvim "$@"
set_terminal_title
}
# global kube aliases
alias kube='kubectl'
alias k='kubectl'
# global aliases
alias ..='cd ..'
# ============================================================================
# Profile-Specific Configuration
# ============================================================================
[[ -f ~/.config/shell/aliases.{{ .profile }}.zsh ]] && source ~/.config/shell/aliases.{{ .profile }}.zsh
[[ -f ~/.config/shell/aliases.local.zsh ]] && source ~/.config/shell/aliases.local.zsh