You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README states that each line from list_cmd should provide at least three fields plus an optional fourth. preview_cmd then can access the first field as {1} and the fourth, optional, as {2}:
The list_cmd generated the list of entries. For each entry, it has to print the following columns, separated by the \034 field separator character:
The item to launch. This will get passed to preview_cmd and launch_cmd as {1}
The name of your provider (the same as what what you put inside the brackets, so my-provider in this example)
The text that appears in the fzf window. You might want to prepend it with a glyph and add some color via ANSI escape codes
(optional) Metadata that you can pass to preview_cmd and launch_cmd as {2}. For example, this is used to specify a specific Desktop Action inside a .desktop file
The preview_cmd renders the contents of the fzf preview panel. You can use the template variable {1} in your command, which will be substituted with the value of the selected item.
The name of the provider (here, "test") is passed to preview_cmd as {1} and the item to launch is passed as {2}. Contrary to the docs, the optional metadata is not available to preview_cmd.
A simple, backwards-compatible, way of addressing this would be to pass the whole line from list_cmd through to preview_cmd from fzf ie. on l317
--preview "$0 describe {2} {1} {+}"
(Plus updating the docs.)
The text was updated successfully, but these errors were encountered:
The README states that each line from
list_cmd
should provide at least three fields plus an optional fourth.preview_cmd
then can access the first field as{1}
and the fourth, optional, as{2}
:However, with a minimal test provider like this:
The name of the provider (here, "test") is passed to
preview_cmd
as{1}
and the item to launch is passed as{2}
. Contrary to the docs, the optional metadata is not available topreview_cmd
.A simple, backwards-compatible, way of addressing this would be to pass the whole line from
list_cmd
through topreview_cmd
fromfzf
ie. on l317(Plus updating the docs.)
The text was updated successfully, but these errors were encountered: