-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc.mbp
91 lines (72 loc) · 2.67 KB
/
.zshrc.mbp
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
87
88
89
90
91
# # iterm2
# test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# homebrew
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"
# export LD_LIBRARY_PATH=/opt/homebrew/lib:$LD_LIBRARY_PATH
# export CPATH=/opt/homebrew/include:$CPATH
# export LDFLAGS="-L/opt/homebrew/lib"
# export CPPFLAGS="-I/opt/homebrew/include"
export DYLD_LIBRARY_PATH="$(brew --prefix)/lib:$DYLD_LIBRARY_PATH"
# starship
eval "$(starship init zsh)"
# language environment
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# gnu coreutils
COREUTILS_VER=9.5
export PATH=/opt/homebrew/Cellar/coreutils/${COREUTILS_VER}/libexec/gnubin:$PATH
export MANPATH=/opt/homebrew/Cellar/coreutils/${COREUTILS_VER}/libexec/gnuman:$MANPATH
export PATH=/opt/homebrew/Cellar/gnu-getopt/2.40.2/bin:$PATH
# colors
if [ -x /opt/homebrew/Cellar/coreutils/${COREUTILS_VER}/libexec/gnubin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(gdircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
unset COREUTILS_VER
alias ll='ls -l'
# # Created by `pipx` on 2022-07-07 09:28:35
# export PATH="$PATH:/Users/lento/.local/bin"
# ssh
DEFAULT_USER=$USER
export SSH_KEY_PATH="~/.ssh/id_ed25519"
alias add_ssh_key='ssh-add -K ~/.ssh/id_ed25519 &> /dev/null'
# awesome aliases
[ -f ~/.aliases ] && source ~/.aliases
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# rust
. "$HOME/.cargo/env"
# c++
activate_llvm() {
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
# export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
# export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
}
# zig
export PATH="/Users/lento/lib/zig/zig-latest:${PATH}"
# export PATH="/Users/lento/lib/zig/zls/zig-out/bin:${PATH}"
alias zbr='zig build run --summary all'
alias zb='zig build --summary all'
alias zbt='zig build test --summary all'
# golang
export GOROOT="/Users/lento/lib/go/go-latest"
export PATH="${GOROOT}/bin:${PATH}"
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
export CXX=/opt/homebrew/bin/g++-14
export CC=/opt/homebrew/bin/gcc-14
# bun completions
[ -s "/Users/lento/.bun/_bun" ] && source "/Users/lento/.bun/_bun"
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}