-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
66 lines (52 loc) · 2.04 KB
/
.zshrc
File metadata and controls
66 lines (52 loc) · 2.04 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
##############################################
# Initialize zsh completion system (must be early)
##############################################
autoload -Uz compinit
compinit
##############################################
export PATH=/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH
##############################################
##############################################
# Lazy-load nvm (defers ~1.2s of startup time)
# nvm, node, npm, npx, and yarn will load nvm on first use
##############################################
export NVM_DIR="$HOME/.nvm"
# Add node to PATH immediately (no nvm overhead) so commands work instantly
export PATH="$NVM_DIR/versions/node/v24.12.0/bin:$PATH"
# Lazy-load nvm itself only when explicitly called
nvm() {
unset -f nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm "$@"
}
##############################################
# Development Aliases
##############################################
# Code quality
alias prettier='yarn run prettier'
alias eslint='yarn eslint --fix'
alias fmt='yarn run prettier'
# Git helpers
alias gpr='gh pr create --draft'
alias gprv='gh pr view --web'
# Quick search (uses ripgrep)
alias rgts='rg --type-add "ts:*.{ts,tsx}" --type ts'
alias rgjs='rg --type js'
# DNS and cache flush (Mac)
alias flushcache='sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder && echo "DNS cache flushed"'
alias fix-dns='sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder && echo "DNS cache flushed"'
# Node/npm troubleshooting
alias npmci='npm ci'
# Claude Code alias
alias c="claude"
# claude-statusline
export PATH="$HOME/.local/bin:$PATH"
##############################################
# Starship prompt (fast, cross-shell prompt)
##############################################
eval "$(starship init zsh)"
# pyenv config
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - zsh)"