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

Function ShellQuote

internal/ghostty/ghostty.go:80–82  ·  view source on GitHub ↗

ShellQuote wraps s in single quotes with proper escaping.

(s string)

Source from the content-addressed store, hash-verified

78
79// ShellQuote wraps s in single quotes with proper escaping.
80func ShellQuote(s string) string {
81 return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'"
82}
83
84func escapeAppleScriptString(s string) string {
85 s = strings.ReplaceAll(s, `\`, `\\`)

Callers 3

TestShellQuoteParityFunction · 0.92
TestShellQuoteFunction · 0.70
SpawnTabFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestShellQuoteParityFunction · 0.74
TestShellQuoteFunction · 0.56