summaryrefslogtreecommitdiff
path: root/lua/telescope/utils.lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2020-11-13 21:07:12 +0100
committerGitHub <noreply@github.com>2020-11-13 15:07:12 -0500
commit76e7fe8cb037e7944dbb13ec34362166d44e625b (patch)
tree97987fa49966a47b6b5dc8ec1b79f2ed9bdfd354 /lua/telescope/utils.lua
parent9fad317d0565e4e258d6fdea1279a5ace968549b (diff)
fix: Multiple Previewer fixes (#225)
Fixes previews for files beginning with ~/ Previewer will now show directories Fix if clause with vim.fn.executable
Diffstat (limited to 'lua/telescope/utils.lua')
-rw-r--r--lua/telescope/utils.lua7
1 files changed, 7 insertions, 0 deletions
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), "<TAB>"):gsub("", "<C-F>"):gsub(" ", "<Space>")
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