MCPcopy Index your code
hub / github.com/codeaashu/claude-code / detectTerminal

Function detectTerminal

src/utils/deepLink/terminalLauncher.ts:183–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 * Detect the user's preferred terminal emulator.
182 */
183export async function detectTerminal(): Promise<TerminalInfo | null> {
184 switch (process.platform) {
185 case 'darwin':
186 return detectMacosTerminal()
187 case 'linux':
188 return detectLinuxTerminal()
189 case 'win32':
190 return detectWindowsTerminal()
191 default:
192 return null
193 }
194}
195
196/**
197 * Launch Claude Code in the detected terminal emulator.

Callers 1

launchInTerminalFunction · 0.70

Calls 3

detectMacosTerminalFunction · 0.85
detectLinuxTerminalFunction · 0.85
detectWindowsTerminalFunction · 0.85

Tested by

no test coverage detected