4 # in order to make this work, you will need to have the gem zeus installed
7 local -a _1st_arguments
8 if [[ -e .zeus.sock ]]; then
10 'console:Lets you interact with your Rails application from the command line. (alias = c)'
11 'cucumber:Runs cucumber.'
12 'dbconsole:Figures out which database you are using and drops you into whichever command line interface.'
13 'destroy:Figures out what generate did, and undoes it. (alias = d)'
14 'generate:Uses templates to create a whole lot of things. (alias = g)'
15 'rake:Execute rake tasks.'
16 'runner:Runs Ruby code in the context of Rails non-interactively. (alias = r)'
17 'server:Launches a small web server named WEBrick which comes bundled with Ruby. (alias = s)'
18 'test:Runs RSpec tests. (alias = rspec, testrb)'
19 'version:Shows the version number.'
23 'start:Preloads the zeus environment'
24 'init:Generate a zeus.json file'
28 _rails_generate_arguments() {
48 _rake_does_task_list_need_generating () {
49 if [ ! -f .rake_tasks ]; then return 0;
51 accurate=$(stat -f%m .rake_tasks)
52 changed=$(stat -f%m Rakefile)
53 return $(expr $accurate '>=' $changed)
62 if [ -f Rakefile ]; then
63 if _rake_does_task_list_need_generating; then
64 echo "\nGenerating .rake_tasks..." > /dev/stderr
65 rake --silent --tasks | cut -d " " -f 2 > .rake_tasks
67 tasks=(`cat .rake_tasks`)
68 _wanted tasks expl 'rake' compadd $tasks
73 local curcontext="$curcontext" state line
77 ':command:->command' \
78 '*::options:->options'
83 _describe -t commands "zeus subcommand" _1st_arguments
92 (generate|g|destroy|d)
93 _rails_generate_arguments
94 _wanted generate_arguments expl 'all generate' compadd -a generate_arguments