fix: refacto path matchings throughout the code, change the way we call string methods

This commit is contained in:
kiyan42
2020-04-25 15:11:14 +02:00
parent 7fbcfa531c
commit 60adbfbdf3
6 changed files with 25 additions and 24 deletions

View File

@@ -17,15 +17,6 @@ local function link_to(path)
return luv.fs_readlink(path) or ''
end
local function print_err(err)
if err ~= nil then
api.nvim_command('echohl ErrorMsg')
-- remove the \n with string.sub
api.nvim_command('echomsg "'..string.sub(err, 0, -2)..'"')
api.nvim_command('echohl None')
end
end
local function system(v)
print_err(api.nvim_call_function('system', { v }))
end