module

Shell::AutoComplete::Completion::Quote

Shell-quoting for values embedded in a generated completion script. The command name (from name: or File.basename(PROGRAM_NAME)) and an absolute executable path are arbitrary strings, so wherever they land in shell code they must be quoted — otherwise a value with a space, a redirection like >, or another metacharacter breaks the script or injects into the eval.

Class methods

fish(value : String) : String

Fish single-quoting: inside single quotes fish honors only \\ and \', so escape backslashes first, then single quotes.

Source
posix(value : String) : String

POSIX/bash/zsh single-quoting: wrap in single quotes and end/reopen the quote around each embedded single quote ('\'').

Source