From: Oleg Broytman Date: Thu, 7 Jul 2016 23:50:25 +0000 (+0300) Subject: Use builtin 'type -p' instead of external 'which' with bash X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=841ad3f40a705497534544ff2e00a03bc4a0e55a;p=dotfiles.git Use builtin 'type -p' instead of external 'which' with bash --- diff --git a/.shellrc b/.shellrc index 035f756..9405f79 100644 --- a/.shellrc +++ b/.shellrc @@ -121,7 +121,7 @@ if test -n "$BASH_VERSION"; then fi complete -W "`echo $BROWSER | sed 's/:/ /g'`" start-browser - if which pip >/dev/null 2>&1; then + if type -p pip >/dev/null 2>&1; then eval "`pip completion --bash`" rm -rf /tmp/pip_build_"$USER" fi diff --git a/bin/whence b/bin/whence index e02906e..7cea0f8 100755 --- a/bin/whence +++ b/bin/whence @@ -1,2 +1,2 @@ #! /usr/bin/env bash -type -path "$@" +type -p "$@"