1
0
Fork 0
No description
Find a file
Daniel Baumann 436c868283
Adding upstream version 0.3.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-05 06:49:26 +01:00
.github/workflows Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
pyfzf Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
.gitignore Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
CHANGES Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
LICENSE Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
MANIFEST.in Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
pyfzf.gif Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
README.md Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
setup.py Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00
VERSION Adding upstream version 0.3.1. 2025-02-05 06:49:26 +01:00

pyfzf

https://pypi.python.org/pypi/pyfzf

A python wrapper for junegunn's awesome fzf.

Requirements

  • Python 3.6+
  • fzf

Note: fzf must be installed and available on PATH.

Installation

pip install pyfzf

Usage

>>> from pyfzf.pyfzf import FzfPrompt
>>> fzf = FzfPrompt()

If fzf is not available on PATH, you can specify a location

>>> fzf = FzfPrompt('/path/to/fzf')

Simply pass a list of options to the prompt function to invoke fzf.

>>> fzf.prompt(range(0,10))

You can pass additional arguments to fzf as a second argument

>>> fzf.prompt(range(0,10), '--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)

>>> fzf.prompt(range(0,10), '--read0', '\0')

License

MIT

Thanks

@brookite for adding Windows support in v0.3.0