terminal: answer OSC default color queries#1394
Conversation
|
I am not a fan of the approach using environment variables to pass this around. I am concerned about forwards and backwards compatibility. |
|
@achernya I reworked this to avoid using environment variables for the wrapper/server handoff. The revised version sends the probed default colors as internal I think this is better than the env-var approach because:
I also kept the scope limited to OSC 10/11 default foreground/background replies and added a small regression for valid 1-4 digit XParseColor components. |
terminal: Answer OSC default color queries
Fixes #1145.
Fixes #1351.
Related to #1350, but this PR intentionally does not implement OSC 4 indexed color queries.
Adds support for OSC 10/11 default foreground/background color queries through mosh. The wrapper probes the local terminal for default colors, forwards only sanitized rgb values to mosh-server, and the server terminal emulator answers remote application queries from those values.
Description:
?queries in the server emulator only when configured values are valid.Validation:
perl -Mdiagnostics -c scripts/mosh.plmake -C src/tests check TESTS=terminal-osc-default-colorsmake -j4 checkpassed the new regression but localwindow-resize.testerrored in this macOS/tmux environment; the log showed the driver sentqexitto the shell instead of exitingless.