First working version of new event dispatching framwork.
[screen-lua.git] / src / scripts / cmdcallback.lua
blobf6a5431cdfaed6e97e866986756423bb1c03cd1c
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
8 f:write(" " .. c)
9 end
11 f:write("\n")
12 f:close()
13 end
15 screen.listen_to("global_cmdexecuted", "command_executed")