Skip to content
Discussion options

You must be logged in to vote

But I can't find a way to get back the user input... any idea?:)

Use opts.last_query from the second arg of the function callback:

actions = {
        ["enter"] = function(selected, opts)
          -- user input is in opts.last_query

For more info see how fzf-lua git branch add bind works:

M.git_branch_add = function(selected, opts)
-- "reload" actions (fzf version >= 0.36) use field_index = "{q}"
-- so the prompt input will be found in `selected[1]`
-- previous fzf versions (or skim) restart the process instead
-- so the prompt input will be found in `opts.last_query`
local branch = opts.la…

Replies: 2 comments 3 replies

Comment options

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

Answer selected by wisonye
Comment options

You must be logged in to vote
2 replies
@ibhagwan
Comment options

@sohanemon
Comment options

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