()
| 62 | export type ClipboardPath = 'native' | 'tmux-buffer' | 'osc52' |
| 63 | |
| 64 | export function getClipboardPath(): ClipboardPath { |
| 65 | const nativeAvailable = |
| 66 | process.platform === 'darwin' && !process.env['SSH_CONNECTION'] |
| 67 | if (nativeAvailable) return 'native' |
| 68 | if (process.env['TMUX']) return 'tmux-buffer' |
| 69 | return 'osc52' |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Wrap a payload in tmux's DCS passthrough: ESC P tmux ; <payload> ESC \ |