mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-07 02:03:22 +00:00
fix(tui): support copying over ssh with set-clipboard on tmux config (#30472)
Co-authored-by: Simon Klee <hello@simonklee.dk>
This commit is contained in:
parent
f6c5afe5a9
commit
def7220bfc
1 changed files with 2 additions and 1 deletions
|
|
@ -23,7 +23,8 @@ function command(command: string, args: string[] = [], input?: string) {
|
|||
function writeOsc52(text: string) {
|
||||
if (!process.stdout.isTTY) return
|
||||
const sequence = `\x1b]52;c;${Buffer.from(text).toString("base64")}\x07`
|
||||
process.stdout.write(process.env.TMUX || process.env.STY ? `\x1bPtmux;\x1b${sequence}\x1b\\` : sequence)
|
||||
const passthrough = `\x1bPtmux;\x1b${sequence}\x1b\\`
|
||||
process.stdout.write(process.env.TMUX ? sequence + passthrough : process.env.STY ? passthrough : sequence)
|
||||
}
|
||||
|
||||
export async function read() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue