Tired of retyping your long command lines? Try aliasing! I am currently running on Ubuntu OS. But you can google your counterpart OS for sure, but here is the idea:
On your terminal open your .bashrc
> sudo nano ~/.bashrc
Here you setup a puf
equates to the long command line you always use. For my case it is the phpunit
with the --filter
argument. Go to the last line by CTRL+W
and CTRL+V
. At the bottom of the file you can paste your alias.
> alias puf="~/.composer/vendor/phpunit/phpunit/phpunit --filter"
# this is composer global vendor
> alias psf="vendor/bin/php-cs-fixer fix"
# this is project folder specific
Don't forget to source
it to save the alias after saving it
> source ~/.bashrc
Now, you can run your command like a normal one
> puf UserRegistrationTest