File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 6262echo '
6363import json, subprocess, sys
6464
65+
6566def main():
6667 data: dict[str, list[dict]] = json.loads(subprocess.check_output(["fastfetch", "--help-raw"]))
6768
6869 for key in data:
6970 for flag in data[key]:
71+ if flag["long"] == "logo-color-[1-9]":
72+ for i in range(1, 10):
73+ print(f"""complete -c fastfetch -d "{flag["desc"]}" -l "logo-color-{i}" -x -a "(__fastfetch_complete_color)" """)
74+ continue
75+
7076 if flag.get("pseudo", False):
7177 continue
7278
@@ -75,7 +81,7 @@ def main():
7581 command_prefix += f""" -o {flag["short"]}"""
7682
7783 if "arg" in flag:
78- type: str = flag["arg"]["type"];
84+ type: str = flag["arg"]["type"]
7985 if type == "bool":
8086 print(f"{command_prefix} -x -a \ "(__fastfetch_complete_bool)\ "")
8187 elif type == "color":
@@ -98,6 +104,7 @@ def main():
98104 else:
99105 print(f"{command_prefix} -f")
100106
107+
101108if __name__ == "__main__":
102109 try:
103110 main()
You can’t perform that action at this time.
0 commit comments