cli
cli copied to clipboard
Session context in menu items
Is it possible to get some context related to the session in the function defined for the menu? One example would be a menu command to enable / disable debug output but only on that session - it wouldn't affect all sessions connected.
Do you mean adding some sort of identifier of the session in the handlers to store in the application session related information?
Yes. For example, in the examples there is a way to turn color on and off. It would make sense if that was per session so if 2 users were connected it only affected their session. To accomplish that it would make sense to store a value related to the session which could both be set by a menu item and also used by other menu items.
@jhndnnqsc right, it seems a quite reasonable use case. I'll add this feature in the roadmap. Thank you very much.