X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=a47a6fa6cb6d99ef82ae7eb6be6742e868958bf8;hb=5a6e794f459b3e83b6d665e05d0ab0c8bc6cdfbe;hp=5aff8e034848cbbfb816f6cd54d65d2055ecd0e7;hpb=51c8b40fd2aac71d29dc9298ca65425725ad1edd;p=distro-setup diff --git a/brc b/brc index 5aff8e0..a47a6fa 100644 --- a/brc +++ b/brc @@ -14,9 +14,9 @@ if [[ -s /a/bin/bash-bear-trap/bash-bear ]]; then else # bleh shellcheck can't handle disabling in an elif, so nesting this if. # shellcheck disable=SC2154 # set in .bashrc - if [[ -s $bashrc_dir/err ]]; then + if [[ -s $bashrc_dir/bash-bear ]]; then # shellcheck source=/a/bin/bash-bear-trap/bash-bear - source $bashrc_dir/err + source $bashrc_dir/bash-bear fi fi @@ -725,6 +725,7 @@ khcopy() { ssh-copy-id $1 } +# copy path into clipboard a() { local x x=$(readlink -nf "${1:-$PWD}") @@ -1455,13 +1456,22 @@ g() { gp() { cat &>/a/tmp/gtmp g "$@" /a/tmp/gtmp - } - -# like cmd &> tempfile; emacs tempfile -gc() { +} +# g log +#like cmd &> tempfile; emacs tempfile +# +# note: a useful workflow for doing mass replace on my files: +# gc rem REGEX +## remove any false positives, or manually edit them. rename files if needed. +# sedi 's/REGEX/REPLACEMENT/' $(gr '^/' /a/tmp/gtmp) +gl() { "$@" &> /a/tmp/gtmp g /a/tmp/gtmp - } +} +# g command substitution +gc() { + g $("$@") +} # force terminal version gn() { @@ -2801,6 +2811,8 @@ leap-year() { # on-battery on-bat() { if [[ -e /sys/class/power_supply/AC/online && $(