pyte icon indicating copy to clipboard operation
pyte copied to clipboard

allow custom handler for specific escaped sequence?

Open randy3k opened this issue 8 years ago • 1 comments

Right now, the handlers for OSC sequences are hardcoded and it doesn't support other codes other than 01 and 02. Is there any chance to allow user to specific a handler if a certain sequence is observed. One of such use cases is to detect the sequence

ESC ] 1337 ; File = [optional arguments] : base-64 encoded file contents ^G

which is used in imgcat to display images. It will allow applications to show images in their terminals.

randy3k avatar Jul 13 '17 23:07 randy3k

Hi Randy, yep, this is something I'd like to do. Ideally, pyte should have a dict mapping OSC commands to Screen slots, similar to how it is done for other ESC sequences.

superbobry avatar Jul 16 '17 20:07 superbobry