MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / findFirstPipeOperator

Function findFirstPipeOperator

src/utils/bash/bashPipeCommand.ts:105–113  ·  view source on GitHub ↗

* Finds the index of the first pipe operator in parsed shell command

(parsed: ParseEntry[])

Source from the content-addressed store, hash-verified

103 * Finds the index of the first pipe operator in parsed shell command
104 */
105function findFirstPipeOperator(parsed: ParseEntry[]): number {
106 for (let i = 0; i < parsed.length; i++) {
107 const entry = parsed[i]
108 if (isOperator(entry, '|')) {
109 return i
110 }
111 }
112 return -1
113}
114
115/**
116 * Builds command parts from parsed entries, handling strings and operators.

Callers 1

rearrangePipeCommandFunction · 0.85

Calls 1

isOperatorFunction · 0.70

Tested by

no test coverage detected