Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 27 days 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 (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-05T01:42:19.000Z (about 2 years ago)
- Last Synced: 2023-03-10T04:12:10.305Z (almost 2 years ago)
- Topics: fzf, v, v-module, v-package, vlang, vlang-module, vlang-package
- Language: V
- Homepage: https://vpm.vlang.io/mod/sakkke.vfzf
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vfzf
[![](https://img.shields.io/github/license/sakkke/vfzf?style=for-the-badge)](https://github.com/sakkke/vfzf/blob/main/LICENSE)
[![](https://img.shields.io/badge/VPM-sakkke.vfzf-5D87BF?style=for-the-badge)](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