0

I often do something like this:

php artisan route:list
php artisan migrate
php artisan db:seed

Only artisan command name is changed. I know how to get all parameters of previous command except last: !:1- (in my case it gives me artisan). But maybe exist shortcut that gives me command name with all arguments except last (in my case php artisan)? I know I can use alias a="php artisan" for such purpose, but general shortcut for any command will be very useful.

0

2 Answers 2

3

The same trick applies, just change 1 to 0

!:0-
0

What about a function? I called it rms for route; migrate; seed

rms () { php "$1" "route:list"; php "$1" migrate; php "$1" "db:seed"; }

Not the answer you're looking for? Browse other questions tagged or ask your own question.