bin_path(): use builtin commands and avoid which

This commit is contained in:
Tom "Ravi" Hale
2018-09-14 19:29:06 +07:00
parent f85b9a4727
commit e5da83665a
4 changed files with 10 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ unalias git > /dev/null 2>&1
unset -f git > /dev/null 2>&1
# Use the full path to git to avoid infinite loop with git function
export _git_cmd="$(\which git)"
export _git_cmd="$(bin_path git)"
# Wrap git with the 'hub' github wrapper, if installed (https://github.com/defunkt/hub)
if type hub > /dev/null 2>&1; then export _git_cmd="hub"; fi