local M = {} --- Opens a TUI application in a new scratch buffer and deletes the buffer on exit. function M.open_terminal_app(cmd) vim.cmd("enew") vim.fn.termopen(cmd, { on_exit = function() pcall(vim.cmd, "bdelete!") end, }) end return M