MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getAllCommandNames

Function getAllCommandNames

source code/utils/powershell/parser.ts:1469–1482  ·  view source on GitHub ↗
(parsed: ParsedPowerShellCommand)

Source from the content-addressed store, hash-verified

1467 */
1468// exported for testing
1469export function getAllCommandNames(parsed: ParsedPowerShellCommand): string[] {
1470 const names: string[] = []
1471 for (const statement of parsed.statements) {
1472 for (const cmd of statement.commands) {
1473 names.push(cmd.name.toLowerCase())
1474 }
1475 if (statement.nestedCommands) {
1476 for (const cmd of statement.nestedCommands) {
1477 names.push(cmd.name.toLowerCase())
1478 }
1479 }
1480 }
1481 return names
1482}
1483
1484/**
1485 * Get all pipeline segments as flat list of commands.

Callers 3

extractCommandNameFunction · 0.85
hasCommandNamedFunction · 0.85
hasDirectoryChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected