INNER CODE UNIT · Python
fmt_pipe
torognes/vsearch · completion/scripts/gen_bash.py:60
def fmt_pipe(words: list[str]) -> str:
return "|".join(words)
def main() -> None:
s = spec_mod.load()
# Group value-taking options by what their argument completion looks like.
enum_groups: dict[str, list[str]] = defaultdict(list) # enum_key -> [opt_name]
file_groups: dict[str | None, list[str]] = defaultdict(list) # ftype (or None) -> [opt_name]
outfile_opts: list[str] = []
novalue_opts: list[str] = [] # int/real/string/int_list/real_list
for o in s.options:
a = o.arg
if a.type == "flag":
continue
if a.type == "enum":