summaryrefslogtreecommitdiff
path: root/lua/telescope/_.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/_.lua')
-rw-r--r--lua/telescope/_.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/telescope/_.lua b/lua/telescope/_.lua
index 6b8b445..eaea824 100644
--- a/lua/telescope/_.lua
+++ b/lua/telescope/_.lua
@@ -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