Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git_files causes the file path to have inconsistent slashes #3181

Open
nishantpillai5 opened this issue Jun 22, 2024 · 0 comments
Open

git_files causes the file path to have inconsistent slashes #3181

nishantpillai5 opened this issue Jun 22, 2024 · 0 comments
Labels
bug Something isn't working Windows Relates to window operating system

Comments

@nishantpillai5
Copy link

Description

When opening files from git_files, the file path has inconsistent slashes. find_files works correctly.

Neovim version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068

Operating system and version

Windows 10 Home 22H2, build: 19045.4529

Telescope version / branch / rev

telescope v0.1.8 / f2bfde7

checkhealth telescope

==============================================================================
telescope: health#telescope#check

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 14.1.0 (rev e50df40a19)
- OK fd: found fd 10.1.0

===== Installed extensions ===== ~

Steps to reproduce

  1. nvim .
  2. :Telescope git_files
  3. choose any file
  4. :f

Expected behavior

filename has only forward slashes

Actual behavior

The slashes after the current working directory are back slashes instead of forward slashes.

issue

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-treesitter/nvim-treesitter", build = ":TSUpdate" },
  {
    "nvim-telescope/telescope.nvim",
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
    config = function()
      require("telescope").setup {}
    end,
  },
}

require("lazy").setup(plugins, {
  root = root .. "/plugins",
})
@nishantpillai5 nishantpillai5 added the bug Something isn't working label Jun 22, 2024
@nishantpillai5 nishantpillai5 changed the title git_files makes file path have inconsistent slashes git_files causes the file path to have inconsistent slashes Jun 22, 2024
@jamestrew jamestrew added the Windows Relates to window operating system label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows Relates to window operating system
Projects
None yet
Development

No branches or pull requests

2 participants