mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-09 13:10:40 +00: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
|