Skip to content

Commit e9d1683

Browse files
phanenibhagwan
authored andcommitted
fix: no filename when search_paths length is 1
1 parent c011788 commit e9d1683

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lua/fzf-lua/make_entry.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ M.get_grep_cmd = function(opts, search_query, no_esc)
326326
if is_grep then
327327
-- grep requires adding `-r` to command as paths can be either file or directory
328328
command = M.rg_insert_args(command, print_filename_flags .. " -r")
329+
elseif #search_paths == 1 then
330+
command = M.rg_insert_args(command, print_filename_flags)
329331
end
330332
end
331333

0 commit comments

Comments
 (0)