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

Function getAllCommands

source code/utils/powershell/parser.ts:1488–1503  ·  view source on GitHub ↗
(
  parsed: ParsedPowerShellCommand,
)

Source from the content-addressed store, hash-verified

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

Callers 2

getCommandPrefixStaticFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected