From f2288192581362d7985db4d657c722badb25aeb4 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 10 Jan 2025 08:37:00 -0500 Subject: [PATCH] tasks commands --- dotfiles/.bashrc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index a7d0fa6..003b236 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -105,16 +105,24 @@ alias xsw="lsof 2>/dev/null +D . | grep '.*swp$' | awk '{print \$9}' | sed 's/\. 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$//" | 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 xnspa='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 % --csv | vd - > /dev/null 2>&1' #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 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 xms='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $MSW -i % ' +# alias xmspa='lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd | sed "s|^//|/|")" | fzf | xargs -I % $MSC -i % | vd -f csv -' +# alias xmspa='selected_file=$(lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)" | fzf) && [ -n "$selected_file" ] && $MSC -i "$selected_file" | vd -f csv -' +alias xmspa='selected_file=$(lsof +D ~/.local/state/nvim/swap/ | grep -o "/swap/.*" | cut -c 7- | tr "%" "/" | sed "s/\\.swp$//" | grep "$(pwd)" | fzf) && [ -n "$selected_file" ] && $MSC -i "$selected_file" | sed "2d" | vd -d "|" - > /dev/null 2>&1' alias nv='~/nvim-linux64/bin/nvim' alias gs='git status -s' 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 td='rg "\- \[[^(x|~)]\]"' +alias tdp='rg "\- \[[^(x|~)]\].*(🔼|⏫)"' +alias tdtp='rg "\- \[[^(x|~)]\].*⏫"' # alias tdo='rg "\- \[[^x]\]" | fzf | xargs nvim' -alias tdo='rg "\- \[ \]" --line-number | fzf | awk -F: "{print \$1, \"+\"\$2}" | xargs -r nvim' +alias tdo='rg "\- \[[^(x|~)]\]" --line-number | fzf | awk -F: "{print \$1, \"+\"\$2}" | xargs -r nvim' +alias tdop='rg "\- \[[^(x|~)]\].*(🔼|⏫)" --line-number | fzf | awk -F: "{print \$1, \"+\"\$2}" | xargs -r nvim' alias gr='git reset HEAD' alias gc='git commit -v' alias gd='git difftool' @@ -153,6 +161,7 @@ export VISUAL=vim PAGER="less" LESS="-S" export PSQL_PAGER="pspg" +# export PSQL_PAGER="vd" if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then GIT_PROMPT_ONLY_IN_REPO=1