From a64d47468dd661dde2e22d1872fda0840e8b3bb6 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 4 Apr 2023 12:54:31 -0400 Subject: [PATCH] move aliases --- .bashrc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.bashrc b/.bashrc index c8ef7f8..62335b4 100644 --- a/.bashrc +++ b/.bashrc @@ -91,6 +91,14 @@ fi alias ll='ls -alFh' alias la='ls -A' alias l='ls -CF' +alias opg="lsof +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'" +#alias opg="lsof +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r realpath" +alias osw="lsof +D . | awk '\$NF ~ /swp$/ {print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'" +alias xpg="lsof +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f" +alias xsw="lsof +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 xns='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.exe -S usmidsql01 -i {}' # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert @@ -119,18 +127,7 @@ fi EDITOR=/usr/bin/vim.basic PAGER="less" LESS="-S" -export IPTOKEN="6ac0a563fc06ab" -export PG="psql -U ptrowbridge -d ubm -p 5432 -h usmidsap01" -export MS="sqlcmd.exe -S mid-sql02 -i" export PSQL_PAGER="pspg" -alias opg="lsof +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'" -#alias opg="lsof +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r realpath" -alias osw="lsof +D . | awk '\$NF ~ /swp$/ {print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'" -alias xpg="lsof +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f" -alias xsw="lsof +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 xns='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.exe -S usmidsql01 -i {}' if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then GIT_PROMPT_ONLY_IN_REPO=1