From f4fa02469356088a1d7934bf1f3c7bcd83101a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 9 Apr 2024 09:51:21 +0200 Subject: nvim/telescope: simplify git command --- config/nvim/lua/mytelescopefiles.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'config/nvim/lua') diff --git a/config/nvim/lua/mytelescopefiles.lua b/config/nvim/lua/mytelescopefiles.lua index 46253eb..733a1d8 100644 --- a/config/nvim/lua/mytelescopefiles.lua +++ b/config/nvim/lua/mytelescopefiles.lua @@ -5,14 +5,11 @@ return function() local root, ret = utils.get_os_command_output({ "git", "rev-parse", "--show-toplevel" }, vim.fn.expand("%:h")) if ret == 0 then ts.git_files({ + cwd = root[1], git_command = { "sh", "-c", - "git -C " - .. root[1] - .. " ls-files -c --recurse-submodules && git -C " - .. root[1] - .. " ls-files -o --exclude-standard", + "git ls-files -c --recurse-submodules && git ls-files -o --exclude-standard", }, }) else -- cgit v1.2.3