mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-12-05 08:30:50 +08:00
d3daa585aa
- add function "composer" - uses local composer if available - add function "composer_install" to install composer to current dir
17 lines
475 B
Fish
17 lines
475 B
Fish
# add Composer's global binaries to PATH
|
|
if test -z "$COMPOSER_BIN_PATH"
|
|
set -gx COMPOSER_BIN_PATH $HOME/.composer/vendor/bin
|
|
end
|
|
set PATH $COMPOSER_BIN_PATH $PATH
|
|
|
|
# get composer path
|
|
if test -z "$COMPOSER_BIN"
|
|
if type "composer.phar" > /dev/null
|
|
set -gx COMPOSER_BIN (which composer.phar)
|
|
else if type "composer" > /dev/null
|
|
set -gx COMPOSER_BIN (which composer)
|
|
else
|
|
echo "FAILED to find Composer! Please install composer.phar to your PATH."
|
|
end
|
|
end
|