MCPcopy
hub / github.com/git-lfs/git-lfs / ShellQuote

Function ShellQuote

subprocess/subprocess.go:129–136  ·  view source on GitHub ↗

ShellQuote returns a copied string slice where each element is quoted suitably for sh.

(strs []string)

Source from the content-addressed store, hash-verified

127// ShellQuote returns a copied string slice where each element is quoted
128// suitably for sh.
129func ShellQuote(strs []string) []string {
130 dup := make([]string, 0, len(strs))
131
132 for _, str := range strs {
133 dup = append(dup, ShellQuoteSingle(str))
134 }
135 return dup
136}
137
138// FormatForShell takes a command name and an argument string and returns a
139// command and arguments that pass this command to the shell. Note that neither

Callers 2

FormatForShellQuotedArgsFunction · 0.85
AssertMethod · 0.85

Calls 1

ShellQuoteSingleFunction · 0.85

Tested by 1

AssertMethod · 0.68