laravel / ideas

Issues board used for Laravel internals discussions.
939 stars 28 forks source link

Artisan filter options (app only commands) #2165

Open royduin opened 4 years ago

royduin commented 4 years ago

When running php artisan I'm getting all commands, from Laravel, packages and my application. Currently I can filter with for example php artisan list make on the make "namespace" or do grep, for example: php artisan | grep make but there is no way I can only get my app commands. I could prefix them with app: so I can use the "namespace" filter or grep on it but that doesn't feel very good and I'm loosing the grouping.

It would be nice if I could run php artisan --app or php artisan --own to get only my app/own commands. Maybe also a --vendor filter and keep the grouping by "namespace".

Thoughts?

amcsi commented 3 years ago

Yeah it's an issue for me that each time I hop onto working on an existing Laravel project where there are custom commands, it's always a bit of a pain looking for them. I'm not sure what the previous developer, or even I, namespaced the custom commands for the project... or if they are all under a single namespace at all. That's why it would be great to be able to filter the list to be able to see just the custom commands; all the built-in Laravel commands get in the way.

Bonus points if I could also filter such that I would only see the non-core package library commands as well, in case I'm looking for what commands the dependency libraries offer.