Fixed lazyloading of git completion

This commit is contained in:
2025-08-29 15:23:55 +02:00
parent ddcc6ccd55
commit 58bfcd5a02

View File

@@ -30,4 +30,13 @@ status_dotfiles(){
esac
}
[[ $(type -t __git_complete) == function ]] && __git_complete dotf __git_main
# Load git completion explicitly
if command -v git >/dev/null 2>&1; then
# Source completion script (adjust path for your system)
if [ -f /usr/share/bash-completion/completions/git ]; then
# shellcheck disable=1091
source /usr/share/bash-completion/completions/git
fi
# Now __git_complete should exist
[[ $(type -t __git_complete) == "function" ]] && __git_complete dotf __git_main
fi