symfony.plugin.zsh 313 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
# symfony basic command completion

_symfony_get_command_list () {
    ./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