MCPcopy Index your code
hub / github.com/nikivdev/go / shellQuote

Function shellQuote

cli/spec/main.go:828–836  ·  view source on GitHub ↗
(arg string)

Source from the content-addressed store, hash-verified

826}
827
828func shellQuote(arg string) string {
829 if arg == "" {
830 return "''"
831 }
832 if !strings.ContainsAny(arg, " \t\n\"'`$&|;()<>[]{}!*?\\") {
833 return arg
834 }
835 return "'" + strings.ReplaceAll(arg, "'", "'\"'\"'") + "'"
836}
837
838func buildPromptBundle(path, mode string) (promptBundle, error) {
839 if mode != "codex" {

Callers 1

formatCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected