Function quote

fn quote(in_bytes: &[u8]) -> Cow<'_, [u8]>

Given a single word, return a string suitable to encode it as a shell argument.

Uses default settings except that nul bytes are passed through, which may be dangerous, leading to this function being deprecated.

Equivalent to Quoter::new().allow_nul(true).quote(in_bytes).unwrap().

(That configuration never returns Err, so this function does not panic.)

The string equivalent is [shlex::quote].