diff --git a/.local/bin/scripts/dif b/.local/bin/scripts/dif index bbd39bc..68d454d 100755 --- a/.local/bin/scripts/dif +++ b/.local/bin/scripts/dif @@ -1,5 +1,4 @@ #!/bin/sh # interactive diff with pagination and nice coloring -set -o pipefail diff-color --report-identical-files "$@" | less --RAW-CONTROL-CHARS --quit-on-intr --quit-if-one-screen diff --git a/.local/bin/scripts/m b/.local/bin/scripts/m index 931fff1..23d0aab 100755 --- a/.local/bin/scripts/m +++ b/.local/bin/scripts/m @@ -3,7 +3,7 @@ # and moves the preceding arguments into it. # Automatically elevates if missing permissions. for last; do true; done -! test -e "$1" && echo "$1 does not exist" && exit 1 checkaccess -w "$@" || elevate=sudo +! $elevate test -e "$1" && echo "$1 does not exist" && exit 1 $elevate mkdir -p $(case "$last" in (*/) echo "$last";; (*) dirname "$last";; esac) $elevate mv --interactive "$@"