This is specifically for https://github.com/madebymade/vagrant-dev
Inside your vagrant-dev
directory you might run your tests normally like this:
vagrant ssh -c "cd /var/www/my-project && rake"
But if you are in vagrant-dev/www/my-project
, v
gives you:
v rake
To install this script copy v
into your vagrant-dev
repo in the root directory.
You will want to symlink this into /usr/local/bin
so it's contained in your path:
ln -s /full/path/to/vagrant-dev/v /usr/local/bin/v
And that's it.
The script checks what directory you are in and ensures you are inside a directory in vagrant-dev/www/
. If you are in one of these directories whatever command you run it assumes you want to run it inside vagrant in that directory.
Because I didn't want to keep switching into vagrant with vagrant ssh
and I don't like running long commands like vagrant ssh -c "cd /var/www/my-project && rake db:migrate"
.