Skip to content

Commit d04a31c

Browse files
authored
Merge pull request #448 from jkraemer/rails-test
adds basic file completion for 'rails test' command
2 parents 4696b8e + 5233dbe commit d04a31c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Diff for: src/_rails

+19
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ __rails_commands() {
7979
profiler'[Get profile information from a piece of code]'
8080
plugin'[Install a plugin]'
8181
{runner,r}'[Run a piece of code in the application environment]'
82+
{test,t}'[Run tests]'
8283
)
8384
else
8485
commands=(
@@ -594,6 +595,24 @@ _rails_r() {
594595
_rails_runner
595596
}
596597

598+
_rails_test() {
599+
local context state line curcontext="$curcontext"
600+
601+
_arguments -C \
602+
': :->path'
603+
604+
case "$state" in
605+
path)
606+
_alternative \
607+
'files:filename:_files -g "*.rb"'
608+
;;
609+
esac
610+
}
611+
612+
_rails_t() {
613+
_rails_test
614+
}
615+
597616
_rails "$@"
598617

599618
# Local Variables:

0 commit comments

Comments
 (0)