diff --git a/.config/autostart/kitty.desktop b/.config/autostart/kitty.desktop##hostname.elephant-arch similarity index 100% rename from .config/autostart/kitty.desktop rename to .config/autostart/kitty.desktop##hostname.elephant-arch diff --git a/.config/shell/git b/.config/shell/git index 1bfd973..570bbcd 100644 --- a/.config/shell/git +++ b/.config/shell/git @@ -16,7 +16,7 @@ gcn() { root="$(git rev-parse --show-toplevel)" if test "$root" = "$DATA" then - if test $# -eq 0 || test -e $1 + if test $# -eq 0 || test -e "$1" then fulldir="$(realpath ${1:-$PWD})" dir="${fulldir#$root/*/}" diff --git a/.local/bin/scripts/checkaccess b/.local/bin/scripts/checkaccess index 6a2fad4..bc2ede4 100755 --- a/.local/bin/scripts/checkaccess +++ b/.local/bin/scripts/checkaccess @@ -9,5 +9,6 @@ while test $# -gt 1; do while ! test -e "$dir" do dir="$(dirname "$dir")" done - test $flag "$dir" + test -L "$dir" || + test $flag "$dir" done diff --git a/.local/bin/scripts/git-moves b/.local/bin/scripts/git-moves new file mode 100755 index 0000000..101a383 --- /dev/null +++ b/.local/bin/scripts/git-moves @@ -0,0 +1,5 @@ +#!/bin/sh +# Stage moved files fitting the already staged ones +git diff --name-only --cached >/tmp/staged +git add $(git rev-parse --show-toplevel) +git status -s | tail +2 | grep -vf /tmp/staged | cut -c4- | sed 's/ -> /\n/' | xargs git restore --staged