Commit 6fb86618 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

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.
parent ef220f09
...@@ -20,18 +20,15 @@ _composer () { ...@@ -20,18 +20,15 @@ _composer () {
_arguments \ _arguments \
'1: :->command'\ '1: :->command'\
'*: :->args' '*: :->args'
if [ -f composer.json ]; then
case $state in case $state in
command) command)
compadd `_composer_get_command_list` compadd $(_composer_get_command_list)
;; ;;
*) *)
compadd `_composer_get_required_list` compadd $(_composer_get_required_list)
;; ;;
esac esac
else
compadd create-project init search selfupdate show
fi
} }
compdef _composer composer compdef _composer composer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment