1ab01d015cbe05d80ad08e51b2dc3ab25874f782
1 --[[ For now, this sample function will simply record all the commands executed ]]--
2 function command_executed(name
, args
)
3 os
.execute('mkdir -p /tmp/debug')
4 local f
= io
.open('/tmp/debug/ll', 'a')
5 f
:write("Command executed: " .. name
)
7 for i
, c
in pairs(args
) do
15 function toggle_cmd_log()
16 if (type(ticket
) == "nil") then
17 ticket
= screen
.hook("cmdexecuted", "command_executed")
19 screen
.unhook(ticket
, "command_executed")