mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-20 01:23:43 -05:00
Including vagrant script
11
Examples.md
11
Examples.md
@@ -369,3 +369,14 @@ frb() {
|
|||||||
% . fzf-wrapper
|
% . fzf-wrapper
|
||||||
% [<ENV>] __fzf_wrapper [<ARGS>]
|
% [<ENV>] __fzf_wrapper [<ARGS>]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
###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
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user