Skip to main content

without_trailing_comment

Function without_trailing_comment 

Source
pub(super) fn without_trailing_comment(
    command: &str,
    family: ShellFamily,
) -> &str
Expand description

command without a trailing comment, for the shells whose comments run from an unquoted # to the end of the line (a POSIX shell, fish, PowerShell): the exit marker goes after the command on the same line, and a comment would swallow it. Quotes and backslash escapes are respected.