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-
Sign up to request clarification or add additional context in comments.

Comments

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"; }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.