INNER CODE UNIT · Python
file_groups
torognes/vsearch · completion/scripts/gen_bash.py:69
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":
enum_groups[a.values].append(o.name)
elif a.type == "file":
file_groups[a.ftype].append(o.name)
elif a.type == "outfile":
outfile_opts.append(o.name)
else: # int, real, string, int_list, real_list
novalue_opts.append(o.name)
out = [HEADER, "_vsearch() {", " local cur prev cmd opts i",