-
Notifications
You must be signed in to change notification settings - Fork 0
/
useful_bash.sh
35 lines (28 loc) · 1.23 KB
/
useful_bash.sh
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
export PATH="$HOME/.local/share/bob/nvim-bin:$HOME/.local/bin:$HOME/go/bin:$PATH"
export GOPATH=$HOME/go
function vimgrep_and_open() {
rg -i --vimgrep "$@" | nvim -q -
}
alias vc='cd ~/.config/nvim && vim'
alias vim='nvim'
alias vimdiff="nvim -d"
alias kx='SHELL= kubectx'
alias ks='SHELL= kubens'
alias gs='git switch "$(git branch --all | fzf | sed s,remotes\/origin\/,, | tr -d '[:space:]')"'
alias dev='cd /mnt/c/dev'
alias rg='rg -i'
alias vg='rg -i --vimgrep'
alias vgg='vimgrep_and_open'
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
alias bat='bat --paging=never'
alias xclip="xclip -selection c"
# rg ENV -l | xargs sed -i 's/ENV/something/' for find and replace
# rg -p foo | less -R for paging rg results
# rg --hidden --glob '!.git' --glob '!.vs' 2.7.3 for including hidden files with ignored globs
eval "$(fzf --bash)"
export EDITOR=nvim
export PATH=~/.nvm/versions/node/v20.9.0/bin:$PATH
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_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
eval "$(zoxide init bash)"