INNER CODE UNIT · Python
__vsearch_command_is
torognes/vsearch · completion/scripts/gen_fish.py:41
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("'", "\\'") + "'"
def file_arg_flags(s: spec_mod.Spec, ftype: str | None) -> str:
"""Return the trailing flags for a file-taking option.
Without ftype: -r (require arg, default file completion).