We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96069cf commit fc86546Copy full SHA for fc86546
git
@@ -1,4 +1,19 @@
1
#!/bin/sh
2
-cmd="git-$1-script"
+cmd="$1"
3
shift
4
-exec $cmd "$@"
+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
11
+ exec git-$cmd "$@"
12
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
0 commit comments