MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getCommandSemantic

Function getCommandSemantic

src/tools/BashTool/commandSemantics.ts:94–99  ·  view source on GitHub ↗

* Get the semantic interpretation for a command

(command: string)

Source from the content-addressed store, hash-verified

92 * Get the semantic interpretation for a command
93 */
94function getCommandSemantic(command: string): CommandSemantic {
95 // Extract the base command (first word, handling pipes)
96 const baseCommand = heuristicallyExtractBaseCommand(command)
97 const semantic = COMMAND_SEMANTICS.get(baseCommand)
98 return semantic !== undefined ? semantic : DEFAULT_SEMANTIC
99}
100
101/**
102 * Extract just the command name (first word) from a single command string.

Callers 1

interpretCommandResultFunction · 0.85

Calls 2

getMethod · 0.65

Tested by

no test coverage detected