Skip to content

Instantly share code, notes, and snippets.

@PGBI
Last active November 25, 2020 20:43
Show Gist options
  • Save PGBI/4bdac70e8fcb0d9335db154e9458934f to your computer and use it in GitHub Desktop.
Save PGBI/4bdac70e8fcb0d9335db154e9458934f 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
}
@nnagornyy
Copy link

for mac os user need to be pasted in ~/.bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment