MCPcopy Create free account
hub / github.com/cogentcore/core / ExecWordIsCommand

Function ExecWordIsCommand

shell/execwords.go:149–154  ·  view source on GitHub ↗

ExecWordIsCommand returns true if given exec word is a command-like string (excluding any paths)

(f string)

Source from the content-addressed store, hash-verified

147// ExecWordIsCommand returns true if given exec word is a command-like string
148// (excluding any paths)
149func ExecWordIsCommand(f string) bool {
150 if strings.Contains(f, "(") || strings.Contains(f, "=") {
151 return false
152 }
153 return true
154}

Callers 1

TranspileLineTokensMethod · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected