-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
118 lines (102 loc) · 3.11 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
eval "$(starship init zsh)"
eval "$(direnv hook zsh)"
# eval "$(rbenv init - zsh)"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
alias vim="nvim"
alias g="git"
alias be="bundle exec"
alias mux="tmuxinator"
alias ls="eza --icons"
alias la="ls -la"
alias ll="ls -l"
alias cat="bat"
alias more="bat"
alias dc="docker compose"
alias dcu="docker compose up -d"
alias dcr="docker compose run"
alias psql="pgcli"
alias lg="lazygit"
alias cop="bundle exec rubocop"
alias copm="git diff --name-only | grep '\.rb$' | xargs bundle exec rubocop"
alias copma="git diff --name-only | grep '\.rb$' | xargs bundle exec rubocop -A"
alias cops="git diff --cached --name-only --diff-filter=ACM | grep '\.rb$' | xargs bundle exec rubocop"
alias copsa="git diff --cached --name-only --diff-filter=ACM | grep '\.rb$' | xargs bundle exec rubocop -A"
export EDITOR=nvim
conf() {
git --git-dir=$HOME/repos/dotfiles/ --work-tree=$HOME "$@"
}
uxn() {
uxnemu -2x ~/roms/"$1".rom "$@"
}
export FZF_DEFAULT_COMMAND="rg --files --follow"
export GOPATH="$HOME/repos/go"
export BAT_THEME=ansi
export PLAYDATE_SDK_PATH="$HOME/Developer/PlaydateSDK"
export TEX_PATH="/Library/TeX/texbin"
export CPATH="/opt/homebrew/include:$CPATH"
export LIBRARY_PATH="/opt/homebrew/lib:$LIBRARY_PATH"
export XDG_CONFIG_HOME="$HOME/.config"
export PATH="$HOME/.bin:\
.git/safe/../../bin:\
$HOME/.cargo/bin:\
$GOPATH/bin:\
$HOME/.config/emacs/bin:\
$HOME/.yarn/bin:\
$HOME/.config/yarn/global/node_modules/.bin:\
/opt/homebrew/bin:\
$PLAYDATE_SDK_PATH/bin:\
$TEX_PATH:\
$PATH"
. "/Users/gosha/.indeed-kube-profile"
export MISE_SHELL=zsh
export __MISE_ORIG_PATH="$PATH"
mise() {
local command
command="${1:-}"
if [ "$#" = 0 ]; then
command /opt/homebrew/bin/mise
return
fi
shift
case "$command" in
deactivate|s|shell)
# if argv doesn't contains -h,--help
if [[ ! " $@ " =~ " --help " ]] && [[ ! " $@ " =~ " -h " ]]; then
eval "$(command /opt/homebrew/bin/mise "$command" "$@")"
return $?
fi
;;
esac
command /opt/homebrew/bin/mise "$command" "$@"
}
_mise_hook() {
eval "$(/opt/homebrew/bin/mise hook-env -s zsh)";
}
typeset -ag precmd_functions;
if [[ -z "${precmd_functions[(r)_mise_hook]+1}" ]]; then
precmd_functions=( _mise_hook ${precmd_functions[@]} )
fi
typeset -ag chpwd_functions;
if [[ -z "${chpwd_functions[(r)_mise_hook]+1}" ]]; then
chpwd_functions=( _mise_hook ${chpwd_functions[@]} )
fi
if [ -z "${_mise_cmd_not_found:-}" ]; then
_mise_cmd_not_found=1
[ -n "$(declare -f command_not_found_handler)" ] && eval "${$(declare -f command_not_found_handler)/command_not_found_handler/_command_not_found_handler}"
function command_not_found_handler() {
if /opt/homebrew/bin/mise hook-not-found -s zsh -- "$1"; then
_mise_hook
"$@"
elif [ -n "$(declare -f _command_not_found_handler)" ]; then
_command_not_found_handler "$@"
else
echo "zsh: command not found: $1" >&2
return 127
fi
}
fi
# bun completions
[ -s "/Users/gosha/.bun/_bun" ] && source "/Users/gosha/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"