diff options
Diffstat (limited to 'plugins/zeus')
-rw-r--r-- | plugins/zeus/README.md | 2 | ||||
-rw-r--r-- | plugins/zeus/_zeus | 34 | ||||
-rw-r--r-- | plugins/zeus/zeus.plugin.zsh | 9 |
3 files changed, 39 insertions, 6 deletions
diff --git a/plugins/zeus/README.md b/plugins/zeus/README.md index 4409943fe..d7c2aef80 100644 --- a/plugins/zeus/README.md +++ b/plugins/zeus/README.md @@ -25,6 +25,8 @@ * `zcu` aliases `zeus cucumber` * `zucumber` aliases `zeus cucumber` +* `zspec` aliases `zeus rspec` + * `zt` aliases `zeus test` * `zest` aliases `zeus test` diff --git a/plugins/zeus/_zeus b/plugins/zeus/_zeus new file mode 100644 index 000000000..5a13bd9ec --- /dev/null +++ b/plugins/zeus/_zeus @@ -0,0 +1,34 @@ +#compdef zeus +#autoload + +# in order to make this work, you will need to have the gem zeus installed + +# zeus zsh completion, based on adb completion + +local -a _1st_arguments +_1st_arguments=( +'console:Lets you interact with your Rails application from the command line. (alias = c)' +'cucumber:Runs cucumber.' +'dbconsole:Figures out which database you are using and drops you into whichever command line interface.' +'destroy:Figures out what generate did, and undoes it. (alias = d)' +'generate:Uses templates to create a whole lot of things. (alias = g)' +'rake:Execute rake tasks.' +'runner:Runs Ruby code in the context of Rails non-interactively. (alias = r)' +'server:Launches a small web server named WEBrick which comes bundled with Ruby. (alias = s)' +'start:Preloads the zeus environment' +'test:Runs RSpec tests. (alias = rspec, testrb)' +'version:Shows the version number.' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "zeus subcommand" _1st_arguments + return +fi + +_files diff --git a/plugins/zeus/zeus.plugin.zsh b/plugins/zeus/zeus.plugin.zsh index 2fc7e1ebf..eddfb4f94 100644 --- a/plugins/zeus/zeus.plugin.zsh +++ b/plugins/zeus/zeus.plugin.zsh @@ -2,12 +2,6 @@ # Zeus preloads your Rails environment and forks that process whenever # needed. This effectively speeds up Rails' boot process to under 1 sec. -# Always use bundler. -# Rails depends on bundler, so we can be pretty sure, that there are no -# problems with this command. For all the other aliases I provided an -# alternative, in case people have conflicts with other plugins (e.g. suse). -alias zeus='bundle exec zeus' - # Init alias zi='zeus init' alias zinit='zeus init' @@ -40,6 +34,9 @@ alias zunner='zeus runner' alias zcu='zeus cucumber' alias zucumber='zeus cucumber' +# Rspec +alias zspec='zeus rspec' + # Test alias zt='zeus test' alias zest='zeus test' |