6fb866183d84e53fa009853691e5c0bdd101820b
Author Marc Cornellà <marc.cornella@live.com> Committer Marc Cornellà <marc.cornella@live.com> Date 2015-02-10 18:32 UTC
Message 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.
Diff 1 diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh
2 index 97207242aadba171ac666340c0f4b59611f4a0a6..7f70e3d7267ea9ff6a37b70846bfaf04b41df193 100644
3 --- a/plugins/composer/composer.plugin.zsh
4 +++ b/plugins/composer/composer.plugin.zsh
5 @@ -20,18 +20,15 @@ _composer () {
6 _arguments \
7 '1: :->command'\
8 '*: :->args'
9 - if [ -f composer.json ]; then
10 - case $state in
11 - command)
12 - compadd `_composer_get_command_list`
13 - ;;
14 - *)
15 - compadd `_composer_get_required_list`
16 - ;;
17 - esac
18 - else
19 - compadd create-project init search selfupdate show
20 - fi
21 +
22 + case $state in
23 + command)
24 + compadd $(_composer_get_command_list)
25 + ;;
26 + *)
27 + compadd $(_composer_get_required_list)
28 + ;;
29 + esac
30 }
31
32 compdef _composer composer