From 841ad3f40a705497534544ff2e00a03bc4a0e55a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 8 Jul 2016 02:50:25 +0300 Subject: [PATCH] Use builtin 'type -p' instead of external 'which' with bash --- .shellrc | 2 +- bin/whence | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 "$@" -- 2.39.2