MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / IsSearchOrReadBashCommand

Function IsSearchOrReadBashCommand

tools/bash/semantics.go:147–162  ·  view source on GitHub ↗
(commandLine string)

Source from the content-addressed store, hash-verified

145 return base, sub
146}
147func IsSearchOrReadBashCommand(commandLine string) bool {
148 segments := SplitPipeline(commandLine)
149 meaningfulSegments := 0
150 for _, seg := range segments {
151 base, _ := ParseBase(seg)
152 if semanticNeutralCommands.Contains(base) {
153 continue
154 }
155 meaningfulSegments++
156 if !searchCommands.Contains(base) && !readCommands.Contains(base) && !listCommands.Contains(base) {
157 return false
158 }
159 }
160
161 return meaningfulSegments > 0
162}
163
164func ClassifyBashCommand(commandLine string) string {
165 segments := SplitPipeline(commandLine)

Callers

nothing calls this directly

Calls 2

SplitPipelineFunction · 0.85
ParseBaseFunction · 0.85

Tested by

no test coverage detected