Merge pull request #448 from jkraemer/rails-test

adds basic file completion for 'rails test' command
This commit is contained in:
Syohei YOSHIDA 2016-09-03 21:31:21 +09:00 committed by GitHub
commit d04a31c48d
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: