From 74c0e30e839782b79044d69f1cda1fc6f9bafdba Mon Sep 17 00:00:00 2001 From: Mateus Revoredo Date: Sat, 16 May 2015 21:49:00 -0300 Subject: [PATCH] Including vagrant script --- Examples.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Examples.md b/Examples.md index 540f2e6..7816696 100644 --- a/Examples.md +++ b/Examples.md @@ -368,4 +368,15 @@ frb() { # https://github.com/D630/fzf-wrapper % . fzf-wrapper % [] __fzf_wrapper [] +``` + +###Vagrant + +You must have [`jq`](https://github.com/stedolan/jq) installed on your computer in order to use this function. + +```sh +vs(){ + #List all vagrant boxes available in the system including its status, and try to access the selected one via ssh + cd $(cat ~/.vagrant.d/data/machine-index/index | jq '.machines[] | {name, vagrantfile_path, state}' | jq '.name + "," + .state + "," + .vagrantfile_path'| sed 's/^"\(.*\)"$/\1/'| column -s, -t | sort -rk 2 | fzf | awk '{print $3}'); vagrant ssh +} ``` \ No newline at end of file