MCPcopy Create free account
hub / github.com/Facets-cloud/flow / ShellQuote

Function ShellQuote

internal/iterm/iterm.go:193–195  ·  view source on GitHub ↗

ShellQuote wraps s in single quotes with proper escaping.

(s string)

Source from the content-addressed store, hash-verified

191
192// ShellQuote wraps s in single quotes with proper escaping.
193func ShellQuote(s string) string {
194 return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'"
195}
196
197func escapeAppleScriptString(s string) string {
198 s = strings.ReplaceAll(s, `\`, `\\`)

Callers 3

ShellQuoteFunction · 0.92
TestShellQuoteParityFunction · 0.92
SpawnTabFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestShellQuoteParityFunction · 0.74