Skip to content

Instantly share code, notes, and snippets.

@dhiren051
Forked from PGBI/.profile
Created July 24, 2018 23:41
Show Gist options
  • Save dhiren051/4b127ac7353d098bd5bc6e253d71b41a to your computer and use it in GitHub Desktop.
Save dhiren051/4b127ac7353d098bd5bc6e253d71b41a to your computer and use it in GitHub Desktop.
`vagrant halt all` command to halt all running vagrant VMs
# To be pasted in ~/.profile
vagrant() {
if [[ $@ == "halt all" ]]; then
command vagrant global-status | grep running | colrm 8 | xargs -L 1 -t vagrant halt
else
command vagrant "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment