summaryrefslogtreecommitdiff
path: root/plugins/laravel/_artisan
diff options
context:
space:
mode:
authorXavier Lacoste <xavier.lacoste@inria.fr>2012-09-13 08:43:20 +0200
committerXavier Lacoste <xavier.lacoste@inria.fr>2012-09-13 08:43:20 +0200
commitce74be1e1dfbccd45ced3314fd4a4c8869a49ec4 (patch)
treed3d4a1e133cbe06e794e52cadf846fd09d06b46f /plugins/laravel/_artisan
parent28d3b80db1d5d976a809bc01da191be5b1768fcb (diff)
parent921d2f49ef01acce973980c0aa9c6ffbbd2fbd0b (diff)
downloadzsh-ce74be1e1dfbccd45ced3314fd4a4c8869a49ec4.tar.gz
zsh-ce74be1e1dfbccd45ced3314fd4a4c8869a49ec4.tar.bz2
zsh-ce74be1e1dfbccd45ced3314fd4a4c8869a49ec4.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'plugins/laravel/_artisan')
-rw-r--r--plugins/laravel/_artisan40
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