-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse ConEmu OSC9 #3125
Comments
Here is how ConEmu implements the parsing https://github.com/Maximus5/ConEmu/blob/740b09c363cb16fbb730d72c53eaca1c530a016e/src/ConEmuCD/ConAnsiImpl.cpp#L2264 notably it doesn't validate input beyond what it expects There is also the case that the "Running" state ( the Windows Terminal implementation is even more relaxed: I think it might be reasonable to support a subset of what ConEmu does:
this should follow the spirit of the documentation even if it doesn't follow the implementation of ConEmu or Windows Terminal |
I should note that we don't need a single PR to do all of OSC9 at once to close this issue. In fact, I'd prefer that not the case. I'd rather see small scoped PRs so do less, add tests, make it clean. ❤ And thanks @Jan200101 this is great information! |
This PR implements support for the [ConEmu OSC9;3 escape sequence](https://conemu.github.io/en/AnsiEscapeCodes.html#OSC_Operating_system_commands). | Sequence | Description | | - | - | ESC ] 9 ; 3 ; ”txt“ ST | Change ConEmu Tab to txt. Set empty string to return original Tab text #3125
# Description This PR implements support for the [ConEmu OSC9;1 escape sequence](https://conemu.github.io/en/AnsiEscapeCodes.html#OSC_Operating_system_commands). Based on my understanding of [ConEmu's source code](https://github.com/Maximus5/ConEmu/blob/740b09c363cb16fbb730d72c53eaca1c530a016e/src/ConEmuCD/ConAnsiImpl.cpp#L705-L724): - The default timeout is set to `100` milliseconds if no value is specified. - The timeout value is clamped to a maximum of `10000` milliseconds. #3125
| Sequence | Description | | - | - | ESC ] 9 ; 5 ST | Wait for Enter/Space/Esc. Set environment variable “ConEmuWaitKey” to “ENTER”/”SPACE”/”ESC” on exit. Source: https://conemu.github.io/en/AnsiEscapeCodes.html#OSC_Operating_system_commands #3125
See: https://conemu.github.io/en/AnsiEscapeCodes.html#OSC_Operating_system_commands
Some other background: #3124, #3119
ConEmu OSC9 conflicts with iTerm notifications. We've supported iTerm notifications for a long time and I'd like to continue to do so. As a workaround, I think we should say that any ConEmu OSC9 commands can never be desktop notifications. This feels like a good tradeoff to me because why are you making those notifications anyways... and you can work around it by using OSC777.
We should expand our OSC parser to parse all ConEmu OS commands (OSC9).
As part of this, we should do better research on how ConEmu handles specific erroneous inputs because the table does not make it clear and there is no spec.
NOTE: This issue is only tracking parsing. We should not do anything with these commands. I'm not sure if we ever want to support some of these and for the others we should discuss in a GH discussion about what to do.
The text was updated successfully, but these errors were encountered: