mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
adds basic file completion for 'rails test' command
This commit is contained in:
+19
@@ -79,6 +79,7 @@ __rails_commands() {
|
||||
profiler'[Get profile information from a piece of code]'
|
||||
plugin'[Install a plugin]'
|
||||
{runner,r}'[Run a piece of code in the application environment]'
|
||||
{test,t}'[Run tests]'
|
||||
)
|
||||
else
|
||||
commands=(
|
||||
@@ -594,6 +595,24 @@ _rails_r() {
|
||||
_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 "$@"
|
||||
|
||||
# Local Variables:
|
||||
|
||||
Reference in New Issue
Block a user