https://github.com/sakkke/vfzf
⛱️ A V wrapper for fzf.
https://github.com/sakkke/vfzf
fzf v v-module v-package vlang vlang-module vlang-package
Last synced: 6 months ago
JSON representation
⛱️ A V wrapper for fzf.
- Host: GitHub
- URL: https://github.com/sakkke/vfzf
- Owner: sakkke
- License: mit
- Created: 2022-11-04T11:58:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-05T02:29:39.000Z (over 1 year ago)
- Last Synced: 2025-01-25T05:27:09.268Z (over 1 year ago)
- Topics: fzf, v, v-module, v-package, vlang, vlang-module, vlang-package
- Language: V
- Homepage: https://vpm.vlang.io/mod/sakkke.vfzf
- Size: 12.7 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vfzf
[](https://github.com/sakkke/vfzf/blob/main/LICENSE)
[](https://vpm.vlang.io/mod/sakkke.vfzf)
A V wrapper for [fzf].
This is a V port of [pyfzf].
## Requirements
- [V](https://github.com/vlang/v)
- [fzf]
## Installation
```shell
v install sakkke.vfzf
```
## Usage
```v
import sakkke.vfzf { new_fzf_prompt }
fzf := new_fzf_prompt()
```
If fzf is not available on PATH, you can specify a location:
```v
fzf := new_fzf_prompt(executable_path: '/path/to/fzf')
```
Simply pass a array of options to the prompt function to invoke fzf:
```v
fzf.prompt(choices: ['1', '2', '3'])
```
You can pass additional arguments to fzf as `fzf_options`:
```v
fzf.prompt(choices: ['1', '2', '3'], fzf_options: '--multi --cycle')
```
Input items are written to a temporary file which is then passed to fzf. The items are delimited with `\n` by default, you can also change the delimiter (useful for multiline items):
```v
fzf.prompt(choices: ['1', '2', '3'], fzf_options: '--read0', delimiter: '\0')
```
## License
MIT
## Thanks
- [@nk412](https://github.com/nk412) is the original author of [pyfzf].
[fzf]: https://github.com/junegunn/fzf
[pyfzf]: https://github.com/nk412/pyfzf