From 3a7fa41857394cd2d90d00891413c12fada039c3 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Tue, 9 Feb 2021 18:25:57 +0100 Subject: fix: all git builtin respect cwd now (#517) --- lua/telescope/utils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/telescope/utils.lua') diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 188c1ea..4606e19 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -193,13 +193,13 @@ function utils.display_termcodes(str) return str:gsub(string.char(9), ""):gsub("", ""):gsub(" ", "") end -function utils.get_os_command_output(cmd) +function utils.get_os_command_output(cmd, cwd) if type(cmd) ~= "table" then print('Telescope: [get_os_command_output]: cmd has to be a table') return {} end local command = table.remove(cmd, 1) - return Job:new({ command = command, args = cmd }):sync() + return Job:new({ command = command, args = cmd, cwd = cwd }):sync() end utils.strdisplaywidth = (function() -- cgit v1.2.3