Documentation
¶
Overview ¶
Package shellquote spells a value for a command line that fft prints for a user to paste into a shell. Anything that reaches such a line from the tenant goes through it: a facility id or a tag value is text a stranger may have chosen.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Quote ¶
Quote is s quoted so that a POSIX shell, fish and PowerShell all read it back as s, and leaves it bare when none of them would read it as anything else.
Single quotes are the one quoting the three share, and only while the value holds no single quote and no backslash: a POSIX shell cannot escape a quote inside them, fish reads \' and \\ there, and PowerShell doubles a quote and takes the typographic ones for quotes too. A value with any of those, or with a control or formatting character, has no portable spelling. It is returned POSIX-quoted and stripped of what a terminal would act on, for display only, and portable is false.
Types ¶
This section is empty.