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

Function isPowerShellParameter

src/utils/powershell/parser.ts:1647–1655  ·  view source on GitHub ↗
(
  arg: string,
  elementType?: CommandElementType,
)

Source from the content-addressed store, hash-verified

1645 * to a char check against PS_TOKENIZER_DASH_CHARS.
1646 */
1647export function isPowerShellParameter(
1648 arg: string,
1649 elementType?: CommandElementType,
1650): boolean {
1651 if (elementType !== undefined) {
1652 return elementType === 'Parameter'
1653 }
1654 return arg.length > 0 && PS_TOKENIZER_DASH_CHARS.has(arg[0]!)
1655}
1656
1657/**
1658 * Check if any argument on a command is an unambiguous abbreviation of a PowerShell parameter.

Callers 2

isAllowlistedCommandFunction · 0.85
extractPathsFromCommandFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected