https://github.com/gesundkrank/fzf4j
Fzf implementation in Java
https://github.com/gesundkrank/fzf4j
fzf java
Last synced: 6 months ago
JSON representation
Fzf implementation in Java
- Host: GitHub
- URL: https://github.com/gesundkrank/fzf4j
- Owner: gesundkrank
- License: mit
- Created: 2020-08-04T13:18:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T10:05:45.000Z (almost 6 years ago)
- Last Synced: 2023-07-26T23:15:38.246Z (almost 3 years ago)
- Topics: fzf, java
- Language: Java
- Homepage:
- Size: 105 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= FZF4J
image:https://github.com/gesundkrank/fzf4j/workflows/Release/badge.svg[Release]
image:https://img.shields.io/maven-central/v/de.gesundkrank.fzf4j/fzf4j.svg[link=https://search.maven.org/search?q=g:de.gesundkrank.fzf4j%20AND%20a:fzf4j]
Fzf Java implementation to use in Java CLI applications.
Based on https://github.com/junegunn/fzf.
== Usage
FZF4J is intended to use in Java command-line applications.
In case you want use it directly from the console just the original FZF.
=== Add the dependency to your build file
.Maven
[source,xml]
----
de.gesundkrank.fzf4j
fzf4j
VERSION
----
.Gradle
[source,groovy]
----
implementation group: 'de.gesundkrank.fzf4j', name: 'fzf4j', version: 'VERSION'
----
=== Example
.Create FZF instance
[source,java]
----
Fzf fzf = Fzf.builder()
.reverse()
.orderBy(OrderBy.SCORE)
.normalize()
.build();
----
.Select single item
[source,java]
----
String selectedItem = fzf.select(list);
----
.Select multiple items
[source,java]
----
List selectedItems = fzf.multiSelect(list);
----
.Limit the number of selectable items
[source,java]
----
List selectedItems = fzf.multiSelect(list, 5);
----