This commit is contained in:
Paul Trowbridge 2024-10-29 19:33:21 -04:00
parent bae580c72a
commit 91682d9992

11
.bashrc
View File

@ -89,7 +89,7 @@ fi
vc() { vc() {
git add . git add .
git commit -m "vault backup: $(date "+%Y-%m-%d %H:%M:%S")" git commit -m "commit: $(date "+%Y-%m-%d %H:%M:%S")"
git push git push
} }
# some more ls aliases # some more ls aliases
@ -103,14 +103,18 @@ alias osw="lsof 2>/dev/null +D . | awk '\$NF ~ /swp$/ {print \$9}' | sed 's/\.sw
alias xpg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f" alias xpg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f"
alias xsw="lsof 2>/dev/null +D . | grep '.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f" alias xsw="lsof 2>/dev/null +D . | grep '.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f"
alias ons='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)"' alias ons='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)"'
alias xns='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)" | fzf | xargs -I % $PG -f %' alias xns='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | sed "s/\\.swo$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $PG -f %'
alias xnsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | sed "s/\\.swo$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $PG -f % | pspg'
#alias xnsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)" | fzf | xargs -I % $PG -f % | pspg' #alias xnsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)" | fzf | xargs -I % $PG -f % | pspg'
alias xnsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $PG -f % | pspg'
alias mns='fzf | xargs -I {} sqlcmd -U Pricing -S mid-sql02 -C -i {} | pspg' alias mns='fzf | xargs -I {} sqlcmd -U Pricing -S mid-sql02 -C -i {} | pspg'
alias xmsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $MS -i % | pspg' alias xmsp='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $MS -i % | pspg'
alias nv='~/nvim-linux64/bin/nvim' alias nv='~/nvim-linux64/bin/nvim'
alias gs='git status -s' alias gs='git status -s'
alias ga='git status --untracked-files=all -s | fzf -m | awk "{print \$2}" | xargs git add ' alias ga='git status --untracked-files=all -s | fzf -m | awk "{print \$2}" | xargs git add '
alias gx='git status --untracked-files=all -s | fzf -m | awk "{print \$2}" | xargs git checkout '
alias td='rg "\- \[[^x]\]"'
# alias tdo='rg "\- \[[^x]\]" | fzf | xargs nvim'
alias tdo='rg "\- \[ \]" --line-number | fzf | awk -F: "{print \$1, \"+\"\$2}" | xargs -r nvim'
alias gr='git reset HEAD' alias gr='git reset HEAD'
alias gc='git commit -v' alias gc='git commit -v'
alias gd='git difftool' alias gd='git difftool'
@ -158,3 +162,4 @@ fi
bind 'set bell-style none' bind 'set bell-style none'
[ -f ~/dot_config/.bashrc_local ] && source ~/dot_config/.bashrc_local [ -f ~/dot_config/.bashrc_local ] && source ~/dot_config/.bashrc_local
export PATH=$PATH:~/lua-language-server/bin