diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-01-04 22:24:55 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-02-10 19:32:59 +0100 |
commit | 6fb866183d84e53fa009853691e5c0bdd101820b (patch) | |
tree | 269cca930e5af5dccf818acc98e597ef29377f14 /plugins/composer | |
parent | ef220f0928269f3cdb613db3d3f9ba7775317109 (diff) | |
download | zsh-6fb866183d84e53fa009853691e5c0bdd101820b.tar.gz zsh-6fb866183d84e53fa009853691e5c0bdd101820b.tar.bz2 zsh-6fb866183d84e53fa009853691e5c0bdd101820b.zip |
Remove composer.json file requirement
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.
Diffstat (limited to 'plugins/composer')
-rw-r--r-- | plugins/composer/composer.plugin.zsh | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 97207242a..7f70e3d72 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -20,18 +20,15 @@ _composer () { _arguments \ '1: :->command'\ '*: :->args' - if [ -f composer.json ]; then - case $state in - command) - compadd `_composer_get_command_list` - ;; - *) - compadd `_composer_get_required_list` - ;; - esac - else - compadd create-project init search selfupdate show - fi + + case $state in + command) + compadd $(_composer_get_command_list) + ;; + *) + compadd $(_composer_get_required_list) + ;; + esac } compdef _composer composer |