]> git.phdru.name Git - dotfiles.git/commitdiff
Use builtin 'type -p' instead of external 'which' with bash
authorOleg Broytman <phd@phdru.name>
Thu, 7 Jul 2016 23:50:25 +0000 (02:50 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 7 Jul 2016 23:50:25 +0000 (02:50 +0300)
.shellrc
bin/whence

index 035f756e4c4ce6302c7f41a484e4136af50cefe6..9405f793dcefa7e599f8466192bf738371b13850 100644 (file)
--- 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
index e02906e2bb276979945d2d4ef13601b18b2216bc..7cea0f853d8c58f0646be48718491ff87c634316 100755 (executable)
@@ -1,2 +1,2 @@
 #! /usr/bin/env bash
-type -path "$@"
+type -p "$@"