Autocomplete composer default methods if composer.json is not available
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!
Diff
1diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh
2index c9b762d072ab2a3a0c7df36f76f91c6bc624da6b..639677ba64318a1ba645b70ae03a0eb1fa7ae9b0 100644
3--- a/plugins/composer/composer.plugin.zsh
4+++ b/plugins/composer/composer.plugin.zsh
5@@ -13,6 +13,8 @@ _composer_get_command_list () {
6 _composer () {
7 if [ -f composer.json ]; then
8 compadd `_composer_get_command_list`
9+ else
10+ compadd create-project init search selfupdate show
11 fi
12 }
1314@@ -26,4 +28,4 @@ alias ci='composer install'
15 alias ccp='composer create-project'
1617 # install composer in the current directory
18-alias cget='curl -s https://getcomposer.org/installer | php'
19+alias cget='curl -s https://getcomposer.org/installer | php'