feat(custom-commands): add rut for docker-compose with autocompletion

This commit is contained in:
Oliver
2026-01-21 16:06:29 +01:00
parent 365c351cdf
commit 72a88e79e1
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -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"