isPosixStartupShell (shared/tui-agent-startup-shell.ts)

orca · src/shared/tui-agent-startup-shell.ts · typescript · MIT
cli, tag:knn-classified

Utility module for detecting and tokenizing shell startup commands across POSIX, PowerShell, and CMD.

// Source: https://github.com/stablyai/orca | License: MIT | Copyright 2026 Lovecast Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { tokenizeCustomCommandTemplate, type CommandTokenSpan } from './commit-message-prompt'
import { quotePowerShellLiteral } from './powershell-native-argument'

/**
 * `'posix'` covers every Unix shell Orca can type into, fish included — not
 * because they agree, but because everything this module emits for it is built
 * to be correct in all of them (see quoteStartupArg and clearEnvCommand). There
 * is deliberately no fish member: a dialect Orca has to detect is a dialect it
 * can get wrong, and it cannot detect one reliably for a remote or WSL host.
 */
export type AgentStartupShell = 'posix' | 'powershell' | 'cmd'

type Windows

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key