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

Function classifyCommandName

src/utils/powershell/parser.ts:800–810  ·  view source on GitHub ↗
(
  name: string,
)

Source from the content-addressed store, hash-verified

798/** Classify command name as cmdlet, application, or unknown */
799// exported for testing
800export function classifyCommandName(
801 name: string,
802): 'cmdlet' | 'application' | 'unknown' {
803 if (/^[A-Za-z]+-[A-Za-z][A-Za-z0-9_]*$/.test(name)) {
804 return 'cmdlet'
805 }
806 if (/[.\\/]/.test(name)) {
807 return 'application'
808 }
809 return 'unknown'
810}
811
812/** Strip module prefix from command name (e.g. "Microsoft.PowerShell.Utility\\Invoke-Expression" -> "Invoke-Expression") */
813// exported for testing

Callers 2

transformCommandAstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected