Krikri::Shell
Class methods
One argv element: like quote_if_needed, but whitespace is NOT a
safe character here - a value that Ansible hands to
run_command as a single argv element (an executable, an image
reference, a path, a package name) must never word-split into
extra arguments. Well-formed tokens stay byte-identical; an empty
value becomes '' so it survives as its own (empty) argument.
Like single_quote, but leaves already-shell-safe tokens (bare words,
IPs/CIDRs, port lists, multi-word values such as iptables'
set_counters "10 20") untouched, so command strings built from
well-formed input stay byte-identical to their unquoted form.
Anything containing a shell metacharacter (including an embedded
apostrophe) is single-quoted with the correct '\'' escape, so a
task param can never terminate the quoting and append commands.
Python shlex.split in posix mode, the way Ansible modules
turn a multi-argument string param (e.g. podman_image's
pull_extra_args) into argv elements: whitespace-separated tokens,
single-quoted runs literal, double-quoted runs honoring backslash
escapes for \ " ` $ and newline, backslash outside quotes escaping
the next character. Each returned token is one argv element, ready
to be shell-quoted individually for embedding in a command string.