Skip to content

Document options getter of autocomplete prompt #467

@HamishWHC

Description

@HamishWHC

Is your feature request related to a problem? Please describe.
I am re-implementing a script to search for an item and then perform some actions on it. The original script used fzf (a fuzzy search bash utility). This had the advantage of the closest match would appear at the top of the list. I would like to achieve the same with clack + fuse.js or a similar fuzzy search library, but clack only supports filtering, rather than applying an ordering to the results.

Describe the solution you'd like
I'd like to see an alternative filter option that allows for filtering and changing the order of the items returned (notably, if this filter option allows a promise to be returned, this could also be used to implement async autocompletion).

Describe alternatives you've considered
For now I'm just leaving the matches unordered. I could try using another library, but clack is the nicest [ie]nquirer alternative I've found.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions