diff --git a/.config/git/config b/.config/git/config index df1a7d1..9b972b2 100644 --- a/.config/git/config +++ b/.config/git/config @@ -32,6 +32,9 @@ tool = nvim submodule = log context = 2 + renames = copy + colorMoved = dimmed-zebra + colorMovedWS = allow-indentation-change [merge] tool = nvim [mergetool "nvim"] @@ -179,8 +182,8 @@ cap = !git commit --amend --no-edit && git push --force-with-lease # CLEANUP - rg = rmgonebranches gcr = !git gc && git repack -a -d + # see git-prunerefs [include] path= "diffr" diff --git a/.local/bin/scripts/git-aur b/.local/bin/scripts/git-aur index 3741ffc..3ea499a 100755 --- a/.local/bin/scripts/git-aur +++ b/.local/bin/scripts/git-aur @@ -1,6 +1,10 @@ #!/bin/sh -e aurdir="$DATA/1-projects/aur" -test $# -eq 0 && cd "$aurdir" && exec $SHELL +commands="" +if test $# -eq 0 +then echo "Usage: $0 $commands" + case "$PWD" in ($aurdir*) exit 0;; (*) cd "$aurdir"; exec $SHELL;; esac +fi command=$1 shift url="ssh://aur@aur.archlinux.org/${1:-$(basename $PWD)}.git" @@ -31,5 +35,5 @@ case "$command" in (clean) find "$aurdir" -mindepth 2 -maxdepth 2 \( -iname "*.pkg.tar.*" -o -iname "*.zip" -o -type d -not -name ".*" \) \ -print -exec sudo rm -rI {} +;; - (*) echo "Unknown command!"; exit 3;; + (*) echo "Unknown command! Available: $commands"; exit 3;; esac