fix: Multiple Previewer fixes (#225)

Fixes previews for files beginning with ~/
Previewer will now show directories
Fix if clause with vim.fn.executable
This commit is contained in:
Simon Hauser
2020-11-13 21:07:12 +01:00
committed by GitHub
parent 9fad317d05
commit 76e7fe8cb0
3 changed files with 25 additions and 9 deletions

View File

@@ -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