Last active
August 29, 2015 14:02
-
-
Save gongo/08cc12775a4711917df2 to your computer and use it in GitHub Desktop.
vagrant global controller using peco
This file contains hidden or 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
#!/bin/sh | |
# | |
# Usage: | |
# $ pecrant up | |
# $ pecrant halt | |
# | |
_pecrant_selected_id() { | |
vagrant global-status | awk '/^[[:alnum:]]{7} /' | peco | awk '{print $1}' | |
} | |
pecrant_up() { | |
vagrant up $(_pecrant_selected_id) | |
} | |
pecrant_halt() { | |
vagrant halt $(_pecrant_selected_id) | |
} | |
"pecrant_$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Move to https://github.com/gongo/pecrant