Created
June 21, 2016 13:49
-
-
Save PGBI/9dfd2cad27fca3b7b5b750d4a9ead522 to your computer and use it in GitHub Desktop.
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
# For macOS users | |
# Piece of code to be included in your ~/.profile file. | |
# Typing `vagrant halt all` in your terminal will then halt all the running vagrant VMs. | |
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