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

Function getVariablesByScope

source code/utils/powershell/parser.ts:1535–1541  ·  view source on GitHub ↗
(
  parsed: ParsedPowerShellCommand,
  scope: string,
)

Source from the content-addressed store, hash-verified

1533 * Variable paths in PowerShell can have scopes like "env:PATH", "global:x".
1534 */
1535export function getVariablesByScope(
1536 parsed: ParsedPowerShellCommand,
1537 scope: string,
1538): ParsedVariable[] {
1539 const prefix = scope.toLowerCase() + ':'
1540 return parsed.variables.filter(v => v.path.toLowerCase().startsWith(prefix))
1541}
1542
1543/**
1544 * Check if any command in the parsed result matches a given name (case-insensitive).

Callers 1

checkEnvVarManipulationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected