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

Function extractAllArgPaths

tools/bash/validation.go:251–273  ·  view source on GitHub ↗
(tokens []string)

Source from the content-addressed store, hash-verified

249}
250
251func extractAllArgPaths(tokens []string) []string {
252 paths := []string{}
253 pastDashDash := false
254
255 for _, t := range tokens {
256 if t == "--" {
257 pastDashDash = true
258 continue
259 }
260
261 if !pastDashDash && strings.HasPrefix(t, "-") {
262 continue
263 }
264
265 if isRedirectOperator(t) {
266 continue
267 }
268
269 paths = append(paths, t)
270 }
271
272 return paths
273}
274
275func extractFirstArgPath(tokens []string) []string {
276 for _, t := range tokens {

Callers 1

ExtractPathsFunction · 0.85

Calls 1

isRedirectOperatorFunction · 0.85

Tested by

no test coverage detected