Original project https://github.com/janka/artisanBashCompletion
Ongoing work seems to be done here: https://github.com/argakiig/artisanBashCompletion
This adds bash completion for Laravel 5s artisan CLI.
-
Put "listForBash.php" in app/Console/Commands/ and register it in app/Console/Commands/Kernel.php under $commands as
\App\Console\Commands\listForBash::class,
-
Make artisan executable with
chmod +x artisan
-
Create an alias for the php artisan command
echo 'alias artisan="php artisan"' >> .bash_profile
-
Put the file "artisan" in /etc/bash_completion.d/ and remember to source it with
. /etc/bash_completion.d/artisan
(or source every completion script with. /etc/bash_completion
) if it does not happen already on your system.cp artisan /etc/bash_completion.d/artisan; source /etc/bash_completion.d/artisan;
Now use artisan
and start tabbing away...
Tested on Ubuntu and php 5.6
Have fun...