INNER CODE UNIT · Python

__vsearch_no_command

torognes/vsearch · completion/scripts/gen_fish.py:37

function __vsearch_no_command
    not __vsearch_current_command >/dev/null 2>&1
end

function __vsearch_command_is --argument-names cmd
    set -l current (__vsearch_current_command 2>/dev/null)
    or return 1
    test "$current" = "$cmd"
end

"""


def fish_squote(s: str) -> str:
    """Wrap in single quotes, escaping inner single quotes."""
    return "'" + s.replace("\\", "\\\\").replace("'", "\\'") + "'"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…