Skip to content

Commit 0025c3a

Browse files
authored
Merge pull request #16 from timteeee/fix-open
2 parents cc8f094 + 5f44892 commit 0025c3a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/freeze/init.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ end
8989
local function open_by_os(args)
9090
local is_win = vim.loop.os_uname().sysname:match("Windows")
9191
local is_linux = vim.loop.os_uname().sysname:match("Linux")
92-
local output = vim.fn.expand(args.output)
92+
local output
93+
if type(args.output) == "function" then
94+
output = vim.fn.expand(args.output())
95+
else
96+
output = vim.fn.expand(args.output)
97+
end
9398
local cmd = {}
9499
if is_win then
95100
table.insert(cmd, "explorer")

0 commit comments

Comments
 (0)