1#!/bin/sh
2cmd="$1"
3shift
4if which git-$cmd-script >& /dev/null
5then
6exec git-$cmd-script "$@"
7fi
89
if which git-$cmd >& /dev/null
10then
11exec git-$cmd "$@"
12fi
1314
alternatives=($(echo $PATH | tr ':' '\n' | while read i; do ls $i/git-*-script 2> /dev/null; done))
1516
echo Git command "'$cmd'" not found. Try one of
17for i in "${alternatives[@]}"; do
18echo $i | sed 's:^.*/git-: :' | sed 's:-script$::'
19done | sort | uniq