提交 b2c1af91 编写于 作者: J John Hamelink

Added laravel plugin which gives aliases to artisan and bob, and

provides autocompletion for artisan.
上级 d05b2010
#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
#!zsh
alias artisan='php artisan'
alias bob='php artisan bob::build'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册