-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
73 lines (63 loc) · 1.88 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
if [[ -n $PS1 && -f ~/.bash_prompt ]]; then
. ~/.bash_prompt
ps1_colorful_theme
fi
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
source ~/.bash_linux
source ~/.bash_linux_private
elif [[ "$OSTYPE" == "darwin"* ]]; then
source ~/.bash_macos
source ~/.bash_macos_private
fi
# vim mode
set -o vi
# ALIASES
# Vim
alias vim="nvim"
alias v="nvim"
#Tmux
alias t="bash ~/.scripts/tmux_switch_interactive.sh"
alias tn="bash ~/.scripts/tmux_create.sh"
alias td="tmux detach"
alias ta="tmux attach"
alias tl="tmux ls"
alias tkill="tmux kill-server"
# Git
alias g="git"
alias gs="git status"
alias gc="git add . && git commit -m"
alias gsw="~/.scripts/git_switch_interactive.sh"
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias gb="git for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'"
alias gd="git diff"
alias gaa="git add ."
alias gr="git restore ."
alias yank="git pull"
alias yeet="git push"
alias yeet-hard="git push --force-with-lease"
alias lg="lazygit"
# Utils
alias ..="cd ../"
alias ...="cd ../.."
# Use bat instead of cat
alias cat="bat"
# Search with fzf and open in nvim
alias ff="fd --type f --hidden --exclude .git | fzf --preview 'bat --color=always {1}' | xargs nvim"
# pnpm
export PNPM_HOME="$HOME/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH=$BUN_INSTALL/bin:$PATH
# suppress macos warning about zsh
export BASH_SILENCE_DEPRECATION_WARNING=1
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
export VOLTA_FEATURE_PNPM="1"