ShellQuote wraps s in single quotes with proper escaping. Same implementation as iterm.ShellQuote / terminal.ShellQuote / zellij.ShellQuote.
(s string)
| 209 | // implementation as iterm.ShellQuote / terminal.ShellQuote / |
| 210 | // zellij.ShellQuote. |
| 211 | func ShellQuote(s string) string { |
| 212 | return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'" |
| 213 | } |
no outgoing calls