Skip to content

How do I use tables as entries? #1490

Answered by ibhagwan
kentookura asked this question in Q&A
Discussion options

You must be logged in to vote

See https://github.com/ibhagwan/fzf-lua/wiki, you can’t pass a table in the ways that you described (json key-value), to pass the data into fzf_exec you’ll need to convert the data into a list of strings (using string.format), I.e:

{ 
  “Line1”,
  “Line2”,
}

if you need access to metadata you’ll need to store it separately and have the line contain an index number (or any other identifier) so you can access the metadata, alternatively you can put the metadata into the line and hide it using --with-nth (read man fzf).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kentookura
Comment options

Answer selected by kentookura
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants