From 76e7fe8cb037e7944dbb13ec34362166d44e625b Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Fri, 13 Nov 2020 21:07:12 +0100 Subject: fix: Multiple Previewer fixes (#225) Fixes previews for files beginning with ~/ Previewer will now show directories Fix if clause with vim.fn.executable --- lua/telescope/utils.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lua/telescope/utils.lua') diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 1daea57..22ee245 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -190,4 +190,11 @@ function utils.display_termcodes(str) return str:gsub(string.char(9), ""):gsub("", ""):gsub(" ", "") end +function utils.get_os_command_output(cmd) + local handle = assert(io.popen(cmd, 'r')) + local output = assert(handle:read('*a')) + assert(handle:close()) + return output +end + return utils -- cgit v1.2.3