Last active
January 22, 2016 17:35
-
-
Save mig5/a89af7d113f403521cd7 to your computer and use it in GitHub Desktop.
Bring Vagrant VM up if it's off and you tried to vagrant ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant() { | |
if [[ $@ == "ssh" ]]; then | |
command vagrant ssh || command vagrant up && command vagrant ssh | |
else | |
command vagrant $@ | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment