-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
65 lines (47 loc) · 1.24 KB
/
zshrc
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
# basic shell
for module in ~/.zsh/*.zsh; do
source "$module"
done
# helper functions
function encode64() {
if [ -f "$1" ]; then
local mime;
mime=$(file -b --mime-type "$1")
if [[ $mime == text/* ]]; then
mime="${mime};charset=utf-8"
fi
printf "data:${mime};base64,%s" "$(base64 -i "$1")"
else
if [[ $# -eq 0 ]]; then
cat | base64
else
printf '%s' "$1" | base64
fi
fi
}
function versions() {
bun_version=$(bun --version)
echo "Bun: $bun_version"
node_version="$(node --version)"
echo "Node: $node_version"
npm_version="$(npm --version)"
echo "Npm: $npm_version"
python_version="$(python --version)"
echo "Python: $python_version"
ruby_version="$(ruby --version)"
echo "Ruby: $ruby_version"
}
alias e64=encode64
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# add temporal
export PATH=$PATH:/Users/markn/.temporalio/bin
# bun completions
[ -s "/Users/markn/.bun/_bun" ] && source "/Users/markn/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# py env
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"