Skip to content

Instantly share code, notes, and snippets.

@ErikDeBruijn
Created April 17, 2015 09:56
Show Gist options
  • Save ErikDeBruijn/31b8c5ef2dd687b729be to your computer and use it in GitHub Desktop.
Save ErikDeBruijn/31b8c5ef2dd687b729be to your computer and use it in GitHub Desktop.
oh-my-zsh plugin to use v as a shortcut for vagrant and allow you to quickly execute commands within the vm
v () {
vagrant_commands=(box connect destroy global-status halt help init login package plugin provision rdp reload resume share ssh ssh-config status suspend up version)
if [[ ${vagrant_commands[(r)$1]} = $1 ]]
then
vagrant $*
else
vagrant ssh -c "$*"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment