Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 12 additions & 23 deletions lua/sidekick/cli/session/zellij.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,28 +110,17 @@ function M.sessions()
return ret
end

-- function M:dump()
-- do
-- -- sigh, another broken zellij feature
-- -- dump-screen doesn't include ansi escape sequences
-- -- just the raw text
-- return
-- end
-- local tmp = Config.state("zellij-dump.txt")
-- local ok = Util.exec({ "zellij", "-s", self.mux_session, "action", "dump-screen", "-f", tmp }, {
-- notify = true,
-- })
-- if not ok then
-- return
-- end
-- local f = io.open(tmp, "r")
-- if not f then
-- return
-- end
-- vim.fn.delete(tmp)
-- local content = f:read("*a")
-- f:close()
-- return content
-- end
function M:dump()
if self.mux_session == nil then
return
end
local ok, ret = Util.exec({ "zellij", "-s", self.mux_session, "action", "dump-screen", "-f", "--ansi" }, {
notify = true,
})
if not ok or ret == "" then
return
end
return ret
end

return M