conf2/zsh/.oh-my-zsh/plugins/symfony/symfony.plugin.zsh

14 lines
315 B
Bash
Raw Permalink Normal View History

2019-01-12 15:47:23 +00:00
# symfony basic command completion
_symfony_get_command_list () {
php symfony | sed "1,/Available tasks/d" | awk 'BEGIN { cat=null; } /^[A-Za-z]+$/ { cat = $1; } /^ :[a-z]+/ { print cat $1; }'
}
_symfony () {
if [ -f symfony ]; then
compadd `_symfony_get_command_list`
fi
}
compdef _symfony symfony