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

Function getAllCommands

src/utils/powershell/parser.ts:1486–1501  ·  view source on GitHub ↗
(
  parsed: ParsedPowerShellCommand,
)

Source from the content-addressed store, hash-verified

1484 * Useful for checking each command independently.
1485 */
1486export function getAllCommands(
1487 parsed: ParsedPowerShellCommand,
1488): ParsedCommandElement[] {
1489 const commands: ParsedCommandElement[] = []
1490 for (const statement of parsed.statements) {
1491 for (const cmd of statement.commands) {
1492 commands.push(cmd)
1493 }
1494 if (statement.nestedCommands) {
1495 for (const cmd of statement.nestedCommands) {
1496 commands.push(cmd)
1497 }
1498 }
1499 }
1500 return commands
1501}
1502
1503/**
1504 * Get all redirections across all statements.

Callers 2

getCommandPrefixStaticFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected