fix: man_pages previewer, respecting MANPATH and apropos output parsing (#1764)
- introducing putils writer and use it rather than using PAGER env var - introducing env for lua/telescope/_.lua job interface - to respect MANPATH (and PATH just in case) - fix for apropos output parsing might return e.g. `alacritty, Alacritty` We need to split on first `,`
This commit is contained in:
@@ -299,6 +299,22 @@ M.convert_opts = function(o)
|
||||
|
||||
obj.args = args
|
||||
|
||||
if o.env then
|
||||
if type(o.env) ~= "table" then
|
||||
error(debug.traceback "'env' has to be a table")
|
||||
end
|
||||
|
||||
local transform = {}
|
||||
for k, v in pairs(o.env) do
|
||||
if type(k) == "number" then
|
||||
table.insert(transform, v)
|
||||
elseif type(k) == "string" then
|
||||
table.insert(transform, k .. "=" .. tostring(v))
|
||||
end
|
||||
end
|
||||
obj.env = transform
|
||||
end
|
||||
|
||||
return command, obj
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user