MCPcopy Create free account
hub / github.com/freecodexyz/free-code / extractBaseCommand

Function extractBaseCommand

src/tools/BashTool/commandSemantics.ts:104–106  ·  view source on GitHub ↗

* Extract just the command name (first word) from a single command string.

(command: string)

Source from the content-addressed store, hash-verified

102 * Extract just the command name (first word) from a single command string.
103 */
104function extractBaseCommand(command: string): string {
105 return command.trim().split(/\s+/)[0] || ''
106}
107
108/**
109 * Extract the primary command from a complex command line;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected