Class Osc52
- Namespace
- SharpConsoleUI.Helpers
- Assembly
- SharpConsoleUI.dll
Builds OSC 52 clipboard escape sequences (and the tmux passthrough-wrapped form). Pure string logic — no I/O. The caller writes the returned sequence to the terminal.
public static class Osc52
- Inheritance
-
Osc52
- Inherited Members
Fields
DefaultMaxBytes
Conservative payload cap: below common terminal OSC 52 ceilings (~74–100KB).
public const int DefaultMaxBytes = 74000
Field Value
Methods
BuildSequence(string, bool, int)
Builds an OSC 52 set-clipboard sequence for the clipboard selection ("c").
Returns null when the base64 payload exceeds maxBytes (caller skips emit).
public static string? BuildSequence(string text, bool tmuxWrap, int maxBytes)
Parameters
textstringThe text to place on the clipboard.
tmuxWrapboolWrap in the tmux DCS passthrough envelope (for sessions under tmux).
maxBytesintMaximum allowed base64 length; over this returns null.