Skip to content

Commit

Permalink
Merge pull request #195 from natrim/master
Browse files Browse the repository at this point in the history
  • Loading branch information
bpinto committed Nov 28, 2014
2 parents c56d016 + d3daa58 commit b04c7fa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/composer/composer.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# composer command
function composer
if test -e ./composer.phar # if there is composer in this path use local one
./composer.phar $argv;
else if test -n "$COMPOSER_BIN"
eval "$COMPOSER_BIN" $argv;
else
echo "Please install composer.phar to your PATH. Or use \"composer_install\" to install Composer to current directory."
end
end
16 changes: 16 additions & 0 deletions plugins/composer/composer.load
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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
4 changes: 4 additions & 0 deletions plugins/composer/composer_install.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# install composer in the current directory
function composer_install
curl -s https://getcomposer.org/installer | php
end

0 comments on commit b04c7fa

Please sign in to comment.