mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-24 00:50:44 +00:00
Introduce workspace-aware System side panel with remote process/tmux/Docker management, terminal popup for interactive attach, capability warmup, review-hardened IPC, performance optimizations, toast action errors, and SSH channel recovery on reconnect.
12 lines
437 B
TypeScript
12 lines
437 B
TypeScript
/** POSIX single-quote escaping for remote shell commands built in the renderer. */
|
|
export function shQuote(str: string): string {
|
|
return `'${String(str).replace(/'/g, "'\"'\"'")}'`;
|
|
}
|
|
|
|
export function buildTmuxAttachCommand(sessionName: string, windowIndex?: number): string {
|
|
const target = windowIndex !== undefined
|
|
? `${shQuote(sessionName)}:${windowIndex}`
|
|
: shQuote(sessionName);
|
|
return `tmux attach -t ${target}`;
|
|
}
|