adds basic file completion for 'rails test' command

This commit is contained in:
Jens Kraemer 2016-09-03 11:10:34 +08:00
parent 4696b8e99c
commit 5233dbed36
1 changed files with 19 additions and 0 deletions

View File

@ -79,6 +79,7 @@ __rails_commands() {
profiler'[Get profile information from a piece of code]' profiler'[Get profile information from a piece of code]'
plugin'[Install a plugin]' plugin'[Install a plugin]'
{runner,r}'[Run a piece of code in the application environment]' {runner,r}'[Run a piece of code in the application environment]'
{test,t}'[Run tests]'
) )
else else
commands=( commands=(
@ -594,6 +595,24 @@ _rails_r() {
_rails_runner _rails_runner
} }
_rails_test() {
local context state line curcontext="$curcontext"
_arguments -C \
': :->path'
case "$state" in
path)
_alternative \
'files:filename:_files -g "*.rb"'
;;
esac
}
_rails_t() {
_rails_test
}
_rails "$@" _rails "$@"
# Local Variables: # Local Variables: