You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
584 B
24 lines
584 B
# Symfony2 basic command completion |
|
|
|
_symfony_console () { |
|
echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' | head -n 1)" |
|
} |
|
|
|
_symfony2_get_command_list () { |
|
`_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' |
|
} |
|
|
|
_symfony2 () { |
|
compadd `_symfony2_get_command_list` |
|
} |
|
|
|
compdef _symfony2 '`_symfony_console`' |
|
compdef _symfony2 sf |
|
|
|
#Alias |
|
alias sf='`_symfony_console`' |
|
alias sfcl='sf cache:clear' |
|
alias sfcw='sf cache:warmup' |
|
alias sfroute='sf router:debug' |
|
alias sfcontainer='sf container:debug' |
|
alias sfgb='sf generate:bundle' |