mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 17:13:42 -05:00
Including vagrant script
11
Examples.md
11
Examples.md
@@ -368,4 +368,15 @@ frb() {
|
|||||||
# https://github.com/D630/fzf-wrapper
|
# https://github.com/D630/fzf-wrapper
|
||||||
% . 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