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

Function extractBashCommentLabel

src/tools/BashTool/commentLabel.ts:8–13  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

6 * collapse-group ⎿ hint — it's what Claude wrote for the human to read.
7 */
8export function extractBashCommentLabel(command: string): string | undefined {
9 const nl = command.indexOf('\n')
10 const firstLine = (nl === -1 ? command : command.slice(0, nl)).trim()
11 if (!firstLine.startsWith('#') || firstLine.startsWith('#!')) return undefined
12 return firstLine.replace(/^#+\s*/, '') || undefined
13}
14

Callers 2

renderToolUseMessageFunction · 0.85
collapseReadSearchGroupsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected