Skip to content

Commit

Permalink
fix(completion): add --strip-cwd-prefix to fd (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Aug 6, 2024
1 parent 73bdec9 commit e9413dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/fzf-lua/complete.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ M.path = function(opts)
if not opts then return end
opts.cmd = opts.cmd or (function()
if vim.fn.executable("fdfind") == 1 then
return "fdfind"
return "fdfind --strip-cwd-prefix"
elseif vim.fn.executable("fd") == 1 then
return "fd"
return "fd --strip-cwd-prefix"
elseif utils.__IS_WINDOWS then
return "dir /s/b"
else
Expand All @@ -104,9 +104,9 @@ M.file = function(opts)
opts.cmp_is_file = true
opts.cmd = opts.cmd or (function()
if vim.fn.executable("fdfind") == 1 then
return "fdfind --type f --exclude .git"
return "fdfind --strip-cwd-prefix --type f --exclude .git"
elseif vim.fn.executable("fd") == 1 then
return "fd --type f --exclude .git"
return "fd --strip-cwd-prefix --type f --exclude .git"
elseif vim.fn.executable("rg") == 1 then
return "rg --files"
elseif utils.__IS_WINDOWS then
Expand Down

0 comments on commit e9413dc

Please sign in to comment.