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