Skip to content

Instantly share code, notes, and snippets.

@mig5
Last active January 22, 2016 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mig5/a89af7d113f403521cd7 to your computer and use it in GitHub Desktop.
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
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