add new plugin to autocomplete composer commands

This commit is contained in:
pomaxa 2012-08-02 12:13:45 +03:00
commit 8b89076dc3

View file

@ -0,0 +1,13 @@
# Composer basic command completion
_composer_get_command_list () {
php composer.phar --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
}
_composer () {
if [ -f composer.phar ]; then
compadd `_composer_get_command_list`
fi
}
compdef _composer composer.phar