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

Function hasInplaceFlag

tools/bash/sed_validation.go:156–163  ·  view source on GitHub ↗
(command string)

Source from the content-addressed store, hash-verified

154}
155
156func hasInplaceFlag(command string) bool {
157 for _, token := range Tokenize(command, true) {
158 if token == "-i" || strings.HasPrefix(token, "--in-place") || regexp.MustCompile(`^-i\.`).MatchString(token) {
159 return true
160 }
161 }
162 return false
163}
164
165func extractSedFileArgs(command string) []string {
166 tokens := Tokenize(command, true)

Callers 1

ValidateSedCommandFunction · 0.85

Calls 1

TokenizeFunction · 0.85

Tested by

no test coverage detected