Am I using cmd wrong? #1311
Answered
by
ibhagwan
axkirillov
asked this question in
Q&A
-
here is a function that I wrote local branch_diff = function()
local default_branch = vim.fn.system("git rev-parse --symbolic-full-name refs/remotes/origin/HEAD | sed 's!.*/!!'") or
"main"
local command = "git diff --name-only $(git merge-base HEAD " .. default_branch .. " )"
require 'fzf-lua'.files({ cmd = command })
end
vim.keymap.set("n", "<leader>pf", branch_diff, { noremap = true, silent = true })
Command itself works without problems in the shell. But in fzf lua I see these entries |
Beta Was this translation helpful? Give feedback.
Answered by
ibhagwan
Jul 1, 2024
Replies: 1 comment 1 reply
-
Fzf-lua can’t make up output on its own, add |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
axkirillov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fzf-lua can’t make up output on its own, add
debug=true
to see what command you’re sending to fzf-lua, your issue is there most likely.