-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
74 lines (58 loc) · 2.22 KB
/
.bashrc
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
######################################################################
#
#
# ██████╗ █████╗ ███████╗██╗ ██╗██████╗ ██████╗
# ██╔══██╗██╔══██╗██╔════╝██║ ██║██╔══██╗██╔════╝
# ██████╔╝███████║███████╗███████║██████╔╝██║
# ██╔══██╗██╔══██║╚════██║██╔══██║██╔══██╗██║
# ██████╔╝██║ ██║███████║██║ ██║██║ ██║╚██████╗
# ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
#
#
######################################################################
########################
# PATH SETUP
########################
# Cargo path
. "$HOME/.cargo/env"
# Go path
export GOBIN=$HOME/go/bin
export PATH=$PATH:$GOBIN
# MacTeX
export PATH=/Library/TeX/texbin:$PATH
########################
# ALIASES
########################
alias gs='git status'
alias gc='git commit'
alias ga='git add'
alias gp='git push'
alias gd='git diff'
alias gr='git restore'
alias v='vim'
alias tmux-sessionizer='~/.dotfiles/tmux/tmux-sessionizer.sh'
alias rm='trash'
#######################
# MISC.
#######################
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Set up fzf key bindings and fuzzy completion
eval "$(fzf --bash)"
eval "$(zoxide init --cmd cd bash)"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# Yazi
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"
}
# Use Neovim as default editor
export EDITOR="/opt/homebrew/bin/nvim"
# Use Neovim for man pages
export MANPAGER='nvim +Man!'