mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
parent
df7eaa54b7
commit
66d21bcc8d
1 changed files with 5 additions and 1 deletions
|
@ -46,13 +46,17 @@ _provides() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_is_alias() {
|
||||||
|
git config --get-regexp '^alias\.' | awk '{ print $1 }' | sed 's/alias\.//' | grep -qx "$cmd"
|
||||||
|
}
|
||||||
|
|
||||||
if [ -z "$cmd" ]; then
|
if [ -z "$cmd" ]; then
|
||||||
exec "$libexec/git" "$@"
|
exec "$libexec/git" "$@"
|
||||||
elif [ -x "$libexec/git-$cmd" ] && [ -f "$libexec/git-$cmd" ]; then
|
elif [ -x "$libexec/git-$cmd" ] && [ -f "$libexec/git-$cmd" ]; then
|
||||||
exec "$libexec/git" "$@"
|
exec "$libexec/git" "$@"
|
||||||
elif type "git-$cmd" >/dev/null 2>&1; then
|
elif type "git-$cmd" >/dev/null 2>&1; then
|
||||||
exec "$libexec/git" "$@"
|
exec "$libexec/git" "$@"
|
||||||
elif command -v pkgx >/dev/null 2>&1 && pkg=$(_provides); then
|
elif ! _is_alias && command -v pkgx >/dev/null 2>&1 && pkg=$(_provides); then
|
||||||
exec pkgx +"$pkg" "$libexec/git" "$@"
|
exec pkgx +"$pkg" "$libexec/git" "$@"
|
||||||
else
|
else
|
||||||
exec "$libexec/git" "$@"
|
exec "$libexec/git" "$@"
|
||||||
|
|
Loading…
Reference in a new issue