* Fix for Composer's bin when Composer isn't global
When Composer isn't globally installed, the `composer global` call results in an error. This checks to see if Composer is available before making the call. When Composer isn't available, it will just manually set the directories.
* Fix Composer brackets in global bin directory
* composer: Apply feedback from ricpelo
This applies ricpelo's feedback at https://github.com/robbyrussell/oh-my-zsh/pull/6240#pullrequestreview-64253321
* composer: Fix path check syntax
* composer: test with $commands[] syntax
Add the proper config bin directory to `PATH` instead of the previously (incorrect) fixed `~/.composer/vendor/bin`. Nowadays the right config dir is `~/.config/composer/vendor/bin`.
This is because we can't be sure which arguments require a json file
and which don't, so the `else' statement will always be difficult to
check for correctness.
Use $_comp_command1 for command list generation instead of 'composer':
`$_comp_command1` contains the command written in the command line.
This allows us to have a different composer name
This plugin currently doesn't autocomplete composer commands if there is no composer.json in the current dir. However, the commands create-project, init, search, selfupdate and show are still useful without a composer.json!