Revision 79ee456cf222982f7ee3f003440c57b5f7cffa8b authored by Sven Verdoolaege on 04 July 2005, 11:36:59 UTC, committed by Sven Verdoolaege on 04 July 2005, 11:36:59 UTC
1 parent 2eb6d82
Raw File
git
#!/bin/sh
cmd="$1"
shift
if which git-$cmd-script >& /dev/null
then
	exec git-$cmd-script "$@"
fi

if which git-$cmd >& /dev/null
then
	exec git-$cmd "$@"
fi

alternatives=($(echo $PATH | tr ':' '\n' | while read i; do ls $i/git-*-script 2> /dev/null; done))

echo Git command "'$cmd'" not found. Try one of
for i in "${alternatives[@]}"; do
	echo $i | sed 's:^.*/git-:   :' | sed 's:-script$::'
done | sort | uniq
back to top