shellQuote

fnstring shellQuote(scope const(ubyte)[] argument)

Quotes one remote command argument for a POSIX shell.

The argument is wrapped in single quotes with embedded single quotes escaped as '\\''; every other byte, including whitespace, shell metacharacters, and newlines, is passed through literally.

Parameters

argumentArgument bytes.

Returns

The quoted argument text.

Throws

ScpException when the argument contains a NUL byte.