-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathzshrc
More file actions
86 lines (68 loc) · 3.39 KB
/
zshrc
File metadata and controls
86 lines (68 loc) · 3.39 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
################################################################################
# Interactive shell environment
################################################################################
################################################################################
# brew - https://brew.sh
################################################################################
[ -d "/opt/homebrew" ] && export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
[ -d "/usr/local" ] && export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
################################################################################
# source files in ~/.zsh
################################################################################
if [ -d $HOME/.zsh ]; then
for zsh_config in $HOME/.zsh/*(.); do
source $zsh_config
done
fi
################################################################################
# Brew
################################################################################
HOMEBREW_PREFIX=/opt/homebrew
eval "$($HOMEBREW_PREFIX/bin/brew shellenv)"
################################################################################
# ENV Tooling
################################################################################
HOSTNAME=$(hostname)
if [[ $HOSTNAME =~ ^dagobah ]]; then
eval "$($HOMEBREW_PREFIX/opt/mise/bin/mise activate zsh)"
fi
export GOPATH="$HOME/go"
export NODE_PATH="$HOMEBREW_PREFIX/lib/node_modules:$NODE_PATH"
export PATH="$GOPATH/bin:$HOMEBREW_PREFIX/share/npm/bin:/usr/local/bin:/usr/local/sbin:$PATH"
################################################################################
# PATH
################################################################################
# Don't hash command lookups, allowing us to use ./bin/* commands relative to
# the current working directory.
export PATH="./bin:$PATH"
set +h
# add home and local bin paths
export PATH=~/bin:$PATH
export PATH="/Users/matt/.local/bin:$PATH"
# shopify
if [[ $HOSTNAME != dagobah ]]; then
[ -f /opt/dev/dev.sh ] && source /opt/dev/dev.sh
[ -f $HOME/.shopify/zshrc.sh ] && source $HOME/.shopify/zshrc.sh
[[ -f /opt/dev/sh/chruby/chruby.sh ]] && { type chruby >/dev/null 2>&1 || chruby () { source /opt/dev/sh/chruby/chruby.sh; chruby "$@"; } }
[[ -x /opt/homebrew/bin/brew ]] && eval $(/opt/homebrew/bin/brew shellenv)
[ -f /opt/dev/dev.sh ] && source /opt/dev/dev.sh
# Added by tec agent
[[ -x /Users/matt/.local/state/tec/profiles/base/current/global/init ]] && eval "$(/Users/matt/.local/state/tec/profiles/base/current/global/init zsh)"
# fix fzf path and add a shopify bin path
export PATH=/opt/homebrew/opt/fzf/bin:$PATH
export PATH=$HOME/.shopify/bin:$PATH
# Shopify Hydrogen alias to local projects
alias h2='$(npm prefix -s)/node_modules/.bin/shopify hydrogen'
# cloudplatform: add Shopify clusters to your local kubernetes config
export KUBECONFIG=${KUBECONFIG:+$KUBECONFIG:}/Users/matt/.kube/config:/Users/matt/.kube/config.shopify.cloudplatform
fi
################################################################################
# Benchmarking - https://blog.jonlu.ca/posts/speeding-up-zsh
################################################################################
# add `zmodload zsh/zprof` above
# then run `zprof` in new shells
# bun completions
[ -s "/Users/matt/.bun/_bun" ] && source "/Users/matt/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"