Skip to content

Commit

Permalink
feat(git_files): support emoji/unicode in filenames (#2943)
Browse files Browse the repository at this point in the history
Pass `core.quotepath=false` to achieve this.

Could alternatively pass `-z` but that uses `\0` line termination and
complicates things.

Closes #2900

(cherry picked from commit 955e50d)
  • Loading branch information
jamestrew authored and Conni2461 committed Mar 6, 2024
1 parent ec3474b commit 93dc724
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/telescope/builtin/__git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ git.files = function(opts)
-- By creating the entry maker after the cwd options,
-- we ensure the maker uses the cwd options when being created.
opts.entry_maker = vim.F.if_nil(opts.entry_maker, make_entry.gen_from_file(opts))
local git_command = vim.F.if_nil(opts.git_command, { "git", "ls-files", "--exclude-standard", "--cached" })
local git_command = vim.F.if_nil(
opts.git_command,
{ "git", "-c", "core.quotepath=false", "ls-files", "--exclude-standard", "--cached" }
)

pickers
.new(opts, {
Expand Down

0 comments on commit 93dc724

Please sign in to comment.