Skip to content

Enhancement request: --preview-json to read previews from a simple key-value object instead of spawning an external process #4601

@cspotcode

Description

@cspotcode

PSFzf uses fzf to power tab-completion menus in PowerShell. Tab completions in PowerShell are rich objects generated in-memory with a few fields:
CompletionText, ListItemText, ResultType, ToolTip

ToolTip often contains useful metadata. For example, for commands, it contains usage information:
Here is a screenshot of PSReadLine's MenuCompletion which shows completion entries as an interactive menu. No fuzzy matching though :( The ToolTip string is the multiline blue text
Image

To expose these tooltips in the preview window, we need to provide a process that can look up each tooltip by name, but all the info is already in-memory. Could there be some way to pass this data structure to fzf either to stdin, or via a temp file referenced by --preview-json-file or similar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions