diff options
author | Peter Tillemans <pti@snamellit.com> | 2012-10-08 12:10:24 +0200 |
---|---|---|
committer | Peter Tillemans <pti@snamellit.com> | 2012-10-08 12:10:24 +0200 |
commit | ef96b6c16e1e59c449ef31d658d3232135a3e482 (patch) | |
tree | 0b77f6a14c36c60d575943fff961a8f4476bb100 /plugins/laravel/_artisan | |
parent | 370dbe4fc7caedea615f9543cdf27e70b1c93f2a (diff) | |
parent | 73f777053725ce61d6fada67ff3f174130dd8c94 (diff) | |
download | zsh-ef96b6c16e1e59c449ef31d658d3232135a3e482.tar.gz zsh-ef96b6c16e1e59c449ef31d658d3232135a3e482.tar.bz2 zsh-ef96b6c16e1e59c449ef31d658d3232135a3e482.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/laravel/_artisan')
-rw-r--r-- | plugins/laravel/_artisan | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/laravel/_artisan b/plugins/laravel/_artisan new file mode 100644 index 000000000..8637514cf --- /dev/null +++ b/plugins/laravel/_artisan @@ -0,0 +1,40 @@ +#compdef artisan + +# Laravel autocompletion +# Author: John Hamelink <john@johnhamelink.com> +# +# This plugin does the following: +# - Adds aliases and autocompletion for artisan +# - Adds aliases and autocompletion for bob + +local curcontext="$curcontext" state line _opts _bundles ret=1 +_arguments -C \ + '1: :->cmds' \ + '*:: :->args' && ret=0 + +case $state in + cmds) + + _values "Artisan command" \ + 'session\:install[Create a session table]' \ + 'migrate[Manage Migrations]' \ + 'test[Run a test]' \ + 'route\:\:call[Call a route in the CLI]' \ + 'key\:\:generate[Generate a key]' + ret=0 + ;; + args) + case $line[1] in + migrate) + _values \ + 'install[Create the Laravel migration table' \ + 'make[Create a migration]' \ + 'rollback[Roll back to the last migration operation]' \ + 'reset[Roll back all migrations that have ever run]' + ret=0 + ;; + esac + ;; +esac + +return ret |