1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 13:50:09 +00:00

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.
This commit is contained in:
Marc Cornellà 2015-01-04 22:24:55 +01:00
parent ef220f0928
commit 6fb866183d

View file

@ -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