Skip to content

Instantly share code, notes, and snippets.

@pierrel
Created May 8, 2010 23:57
Show Gist options
  • Select an option

  • Save pierrel/394842 to your computer and use it in GitHub Desktop.

Select an option

Save pierrel/394842 to your computer and use it in GitHub Desktop.
git's not bash
command_not_found_handle() {
# do not run when inside Midnight Commander or within a Pipe
if test -n "$MC_SID" -o ! -t 1 ; then
echo $"$1: command not found"
return 127
fi
if test -x "/usr/local/git/libexec/git-core/git-$1"; then
echo "executing 'git $@'"
git "$@"
else
echo "-bash: $1: command not found"
return 127
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment