mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +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:
parent
ef220f0928
commit
6fb866183d
1 changed files with 9 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue