My current solution is using a handler for the sysConnectionEvent to set up a temporary trigger that detects my prompt. The trigger runs my afterLogon() function and then deletes itself. It works fine, but is there a better way to do all this?
Code: Select all
--------------------------------------
-- Handler for sysConnectionEvent --
--------------------------------------
function sysConnectionEventHandler()
cecho("<red>sysConnectionEventHandler() running at this point.\n")
-- create a color trigger for prompt colors
tempTriggerID = tempColorTrigger(8, 0, [[
killTrigger(tempTriggerID)
tempTriggerID=nil
afterLogon()
]])
end
function afterLogon()
cecho("<red>afterLogon() running at this point.\n")
end