MCPcopy Create free account
hub / github.com/52funny/pikpakcli / escapeShellCompletion

Function escapeShellCompletion

internal/shell/shell.go:1193–1204  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

1191}
1192
1193func escapeShellCompletion(value string) string {
1194 var escaped strings.Builder
1195 escaped.Grow(len(value))
1196 for i := 0; i < len(value); i++ {
1197 switch value[i] {
1198 case ' ', '\\', '"', '\'':
1199 escaped.WriteByte('\\')
1200 }
1201 escaped.WriteByte(value[i])
1202 }
1203 return escaped.String()
1204}
1205
1206// resetFlags recursively resets all flags in the command tree to their default values
1207func resetFlags(cmd *cobra.Command) {

Callers 2

completeRemotePathMethod · 0.85
completeLocalPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected