If git status produces a quoted file name (if the file name contain a space for example) the builtin picker git_status will not parse the result properly and include literal quotes in the file name.
telescope: require("telescope.health").check()
Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.
Checking external dependencies ~
- OK rg: found ripgrep 14.1.0
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities
===== Installed extensions ===== ~
Telescope Extension: `file_browser` ~
- No healthcheck provided
Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured
Telescope Extension: `ui-select` ~
- No healthcheck provided
Steps to reproduce
With minimal.lua in home directory.
mkdir repro
cd repro
git init
echo "test file" > 'file with space.txt'
nvim -nu ~/minimal.lua
Then do :lua require("telescope.builtin").git_status(), type file and <CR>.
Expected behavior
Navigate to the file file with space.txt.
Actual behavior
A new buffer named "file with space.txt" is open.
Minimal config
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
require("telescope").setup {}
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
Description
If
git status
produces a quoted file name (if the file name contain a space for example) the builtin pickergit_status
will not parse the result properly and include literal quotes in the file name.Neovim version
Operating system and version
Arch
Telescope version / branch / rev
master, current commit 5972437
checkhealth telescope
Steps to reproduce
With
minimal.lua
in home directory.Then do
:lua require("telescope.builtin").git_status()
, typefile
and<CR>
.Expected behavior
Navigate to the file
file with space.txt
.Actual behavior
A new buffer named
"file with space.txt"
is open.Minimal config