alacritty / vte

Parser for virtual terminal emulators
https://docs.rs/vte/
Apache License 2.0
242 stars 56 forks source link

Support for APC? #109

Open John-Toohey opened 9 months ago

John-Toohey commented 9 months ago

I am trying to use vte to parse APC commands, which it seems to ignore by setting the state to SosPmApcString and then Anywhere through the duration of the command. Would it be possible to adapt the Parser interface to support parsing these commands?

chrisduerr commented 9 months ago

Curious what you're parsing APC escapes for.

John-Toohey commented 9 months ago

Its a fair question (giving their long obsolescence), I'm trying to parse escape codes to use for a preview feature in an application I am writing and would, preferably, like to have support for the Kitty Graphics Protocol which requires the use of APC to send images to the terminal.

chrisduerr commented 9 months ago

Yeah that's fair. That shouldn't be difficult to add tbh, it mainly doesn't exist yet because I've had no use for it so far.

Are you interested in implementing this yourself?

John-Toohey commented 9 months ago

Indeed I would be interested in implementing it myself, I'll have a further look into the code and try and figure out how it works. My one concern is that the action/state enums seem to be saturated already? I'll look into it later!