commit ee72ed65fe003322fdddc76d434512749a33073a
parent 189750a7847246e205eaebedc5a073fdbe6977e8
Author: finwo <finwo@pm.me>
Date: Tue, 5 Nov 2019 16:49:50 +0100
Search path for composer as well
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/zsh/home/.zshrc b/zsh/home/.zshrc
@@ -30,12 +30,19 @@ function getComposer {
}
function composer {
+ for p in $(echo $PATH | tr ':' '\n'); do
+ for i in $(echo composer{.phar,}); do
+ [ -f "$p/$i" ] || continue
+ php "$p/$i" "$@"
+ return $?
+ done
+ done
for i in $(echo {,~/bin/,/usr/bin/,/usr/local/bin/}composer{.phar,}); do
[ -f "$i" ] || continue
php "$i" "$@"
return $?
done
- echo "Composer is not installed on this system"
+ echo "composer is not installed on this system"
return 1
}