feat(custom-commands): add rut for docker-compose with autocompletion
This commit is contained in:
@@ -103,10 +103,16 @@ function _tat_autocomplete() {
|
|||||||
'files:files:_files'
|
'files:files:_files'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _rut() {
|
||||||
|
# Complete with files, preferring tests/ directory
|
||||||
|
_files -g '*.php'
|
||||||
|
}
|
||||||
|
|
||||||
# Register the completion function for zsh
|
# Register the completion function for zsh
|
||||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||||
compdef _tat_autocomplete tat
|
compdef _tat_autocomplete tat
|
||||||
compdef _cmr cmr
|
compdef _cmr cmr
|
||||||
|
compdef _rut rut
|
||||||
else
|
else
|
||||||
# Fallback for bash
|
# Fallback for bash
|
||||||
complete -f -F _tat_autocomplete -o default tat
|
complete -f -F _tat_autocomplete -o default tat
|
||||||
|
|||||||
@@ -86,6 +86,10 @@ function rutvrm () {
|
|||||||
docker-compose exec -T mysql mysql --host=mysql --password=deadbeef --database=vrm_testing < tests/resources/db/*.sql
|
docker-compose exec -T mysql mysql --host=mysql --password=deadbeef --database=vrm_testing < tests/resources/db/*.sql
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function rut() {
|
||||||
|
rutvrm && docker compose exec app composer test "$@"
|
||||||
|
}
|
||||||
|
|
||||||
alias yas="yarn serve"
|
alias yas="yarn serve"
|
||||||
|
|
||||||
alias yai="yarn install"
|
alias yai="yarn install"
|
||||||
|
|||||||
Reference in New Issue
Block a user