my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB

3 years ago
  1. #compdef artisan
  2. # Laravel autocompletion
  3. # Author: John Hamelink <[email protected]>
  4. #
  5. # This plugin does the following:
  6. # - Adds aliases and autocompletion for artisan
  7. # - Adds aliases and autocompletion for bob
  8. local curcontext="$curcontext" state line _opts _bundles ret=1
  9. _arguments -C \
  10. '1: :->cmds' \
  11. '*:: :->args' && ret=0
  12. case $state in
  13. cmds)
  14. _values "Artisan command" \
  15. 'session\:install[Create a session table]' \
  16. 'migrate[Manage Migrations]' \
  17. 'test[Run a test]' \
  18. 'route\:\:call[Call a route in the CLI]' \
  19. 'key\:\:generate[Generate a key]'
  20. ret=0
  21. ;;
  22. args)
  23. case $line[1] in
  24. migrate)
  25. _values \
  26. 'install[Create the Laravel migration table' \
  27. 'make[Create a migration]' \
  28. 'rollback[Roll back to the last migration operation]' \
  29. 'reset[Roll back all migrations that have ever run]'
  30. ret=0
  31. ;;
  32. esac
  33. ;;
  34. esac
  35. return ret