MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / isAttachLike

Function isAttachLike

frontend/app/view/term/shellblocking.ts:56–67  ·  view source on GitHub ↗
(cmd: string, args: string[])

Source from the content-addressed store, hash-verified

54}
55
56function isAttachLike(cmd: string, args: string[]): boolean {
57 if (cmd === "docker" || cmd === "podman") {
58 if (args[0] === "attach") return true;
59 if (args[0] === "exec") return args.some((a) => a === "-it" || a === "-i" || a === "-t");
60 }
61 if (cmd === "kubectl" || cmd === "k3s" || cmd === "oc") {
62 if (args[0] === "attach") return true;
63 if (args[0] === "exec") return args.some((a) => a === "-it" || a === "-i" || a === "-t");
64 }
65 if (cmd === "lxc" && args[0] === "exec") return args.some((a) => a === "-t" || a === "-T");
66 return false;
67}
68
69function isSshInteractive(args: string[]): boolean {
70 const hasForcedTty = args.includes("-t") || args.includes("-tt");

Callers 1

getBlockingCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected