mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
add new plugin to autocomplete composer commands
This commit is contained in:
parent
d05b2010ff
commit
8b89076dc3
1 changed files with 13 additions and 0 deletions
13
plugins/composer/composer.plugin.zsh
Normal file
13
plugins/composer/composer.plugin.zsh
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue