git: Fix working directory of shell aliases

In git aliases, shell commands are executed from the top-level directory
of the repo. Because of this, something like `git glog -- file` didn't
work in subdirectories.

Fix this by creating a wrapper script that first changes into
$GIT_PREFIX before executing the script. Since (currently) the only
use-case is to launch the functions in `autoload/git/`, most of the path
could move into the script, making the git config a lot cleaner.
This commit is contained in:
2025-05-23 16:19:12 +02:00
parent e232c8f37b
commit bbc6d5c9e0
3 changed files with 41 additions and 10 deletions

1
.local/bin/git-zsh-autoload Symbolic link
View File

@@ -0,0 +1 @@
../../.config/git/zsh-autoload.sh