Fixed formatting of laravel artisan autocompletion

This commit is contained in:
Gufran 2013-06-02 00:43:47 +05:30
commit b62c406f0b

View file

@ -1,75 +1,77 @@
#compdef artisan #compdef artisan
# Laravel Artisan autocompletion
# Laravel autocompletion # Author: Mohammad Gufran<gufran@websterfolks.com>
# Author: John Hamelink <john@johnhamelink.com>
# #
# This plugin does the following: # This plugin does the following:
# - Adds aliases and autocompletion for artisan # - Adds aliases and autocompletion for artisan
# - Adds aliases and autocompletion for bob local curcontext="$curcontext" state line _opts _bundles ret=1
# _opts _bundles
local curcontext="$curcontext" state line ret=1
_arguments -C \ _arguments -C \
'1: :->cmds' \ '1: :->cmds' \
'2:: :->args' && ret=0 '*:: :->args' && ret=0
case $state in
case $state in
cmds) cmds)
_values "Artisan command" \ _values "Artisan command" \
'clear-compiled[Remove the compiled class file]' \ '--ansi[Force ANSI output.]' \
'down[Put the application into maintenance mode]' \ '--env[The environment the command should run under.]' \
'dump-autoload[Regenerate framework autoload files]' \ '--help[Display this help message.]' \
'help[Displays help for a command]' \ '--no-ansi[Disable ANSI output.]' \
'list[Lists commands]' \ '--no-interaction[Do not ask any interactive question.]' \
'migrate[Run the database migrations]' \ '--quiet[Do not output any message.]' \
'optimize[Optimize the framework for better performance]' \ '--verbose[Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug]' \
'routes[List all registered routes]' \ '--version[Display this application version.]' \
'serve[Serve the application on the PHP development server]' \
'tinker[Interact with your application]' \
'up[Bring the application out of maintenace mode]' \
'workbench[Create a new package workbench]' \
'asset\:publish[Publish assets of a package to the public directory]' \ 'asset\:publish[Publish assets of a package to the public directory]' \
'auth\:reminders[Create a migration for the password reminders table]' \ 'auth\:reminders[Create a migration for the password reminders table]' \
'cache\:clear[Flush the application cache]' \ 'cache\:clear[Flush the application cache]' \
'clear-compiled[Remove the compiled class file]' \
'command\:make[Create a new Artisan command]' \ 'command\:make[Create a new Artisan command]' \
'config\:publish[Publish configuration of a package to the application]' \ 'config\:publish[Publish configuration of a package to the application]' \
'controller\:make[Create a new resourceful controller]' \ 'controller\:make[Create a new resourceful controller]' \
'db\:seed[Seed the database with records]' \ 'db\:seed[Seed the database with records]' \
'down[Put the application into maintenance mode]' \
'dump-autoload[Regenerate framework autoload files]' \
'help[Displays help for a command]' \
'key\:generate[Set the application key]' \ 'key\:generate[Set the application key]' \
'list[Lists commands]' \
'migrate[Run the database migrations]' \
'migrate\:install[Create the migration repository]' \ 'migrate\:install[Create the migration repository]' \
'migrate\:make[Create a new migration file]' \ 'migrate\:make[Create a new migration file]' \
'migrate\:refresh[Reset and re-run all migrations]' \ 'migrate\:refresh[Reset and re-run all migrations]' \
'migrate\:reset[Rollback all database migrations]' \ 'migrate\:reset[Rollback all database migrations]' \
'migrate\:rollback[Rollback the last database migration]' \ 'migrate\:rollback[Rollback the last database migration]' \
'optimize[Optimize the framework for better performance]' \
'queue\:listen[Listen to a given queue]' \ 'queue\:listen[Listen to a given queue]' \
'queue\:subscribe[Subscribe a URL to an Iron.io push queue]' \ 'queue\:subscribe[Subscribe a URL to an Iron.io push queue]' \
'queue\:work[Process the next job on a queue]' \ 'queue\:work[Process the next job on a queue]' \
'session\:table[Create a migration for the session database table]' 'routes[List all registered routes]' \
ret=0 'serve[Serve the application on the PHP development server]' \
;; 'session\:table[Create a migration for the session database table]' \
'tinker[Interact with your application]' \
'up[Bring the application out of maintenace mode]' \
'workbench[Create a new package workbench]' \
ret=0
;;
args) args)
case $line[1] in case $line[1] in
migrate) migrate)
_values \ _values \
'install [Create the Laravel migration table' \ 'install[Create the Laravel migration table]' \
'make [Create a migration]' \ 'make[Create a migration]' \
'rollback [Roll back to the last migration operation]' \ 'rollback[Roll back to the last migration operation]' \
'reset [Roll back all migrations that have ever run]' \ 'reset[Roll back all migrations that have ever run]' \
'refresh [Reset and re-run all migrations]' 'refresh[Reset and re-run all migrations]'
ret=0 ret=0
;; ;;
queue) queue)
_values \ _values \
'listen [Listen to a given queue]' \ 'listen[Listen to a given queue]' \
'subscribe [Subscribe a URL to an Iron.io push queue]' \ 'subscribe[Subscribe a URL to an Iron.io push queue]' \
'work [Process the next job on the queue]' 'work[Process the next job on the queue]'
ret=0
ret=0
;; ;;
esac esac
;; ;;
esac esac
;;
return ret return ret