merge: main

This commit is contained in:
aduhayon 2022-08-10 09:41:31 +02:00
parent 152e72294a
commit 64f848ec80
8 changed files with 20 additions and 15 deletions

View file

@ -10,9 +10,9 @@ alias umnt='sudo umount /mnt -R'
alias vi="$EDITOR"
alias tmp="cd $(mktemp -d)"
function watch() {
function fnalias() {
# alias alias_cmd='cmd'
cmd="$(alias "${1}")"
cmd="$(alias "${2}")"
if [ -n "${cmd}" ]; then
# remove everything before and including the first =
@ -20,8 +20,10 @@ function watch() {
# remove first and last char in this case, quotes
cmd="${cmd:1:-1}"
else
cmd="${1}"
cmd="${2}"
fi
env watch "${cmd}" "${@:2}"
env "${1}" "${cmd}" "${@:3}"
}
alias watch='fnalias watch'