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