summaryrefslogtreecommitdiff
path: root/plugins/composer/composer.plugin.zsh
diff options
context:
space:
mode:
authorhacfi <philipp.wahala@gmail.com>2013-03-13 04:06:16 +0100
committerhacfi <philipp.wahala@gmail.com>2013-03-13 04:06:16 +0100
commit4bf174c38b2b8ff9b000accf63155d9756c63a02 (patch)
treeb7d8a9f878e44d31374d9f0b79b7b4ac5652baa1 /plugins/composer/composer.plugin.zsh
parent0ab0e67ecfc52b4779b700149a9c51feeb05318e (diff)
downloadzsh-4bf174c38b2b8ff9b000accf63155d9756c63a02.tar.gz
zsh-4bf174c38b2b8ff9b000accf63155d9756c63a02.tar.bz2
zsh-4bf174c38b2b8ff9b000accf63155d9756c63a02.zip
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!
Diffstat (limited to 'plugins/composer/composer.plugin.zsh')
-rw-r--r--plugins/composer/composer.plugin.zsh4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh
index c9b762d07..639677ba6 100644
--- a/plugins/composer/composer.plugin.zsh
+++ b/plugins/composer/composer.plugin.zsh
@@ -13,6 +13,8 @@ _composer_get_command_list () {
_composer () {
if [ -f composer.json ]; then
compadd `_composer_get_command_list`
+ else
+ compadd create-project init search selfupdate show
fi
}
@@ -26,4 +28,4 @@ alias ci='composer install'
alias ccp='composer create-project'
# install composer in the current directory
-alias cget='curl -s https://getcomposer.org/installer | php' \ No newline at end of file
+alias cget='curl -s https://getcomposer.org/installer | php'