Skip to content

Commit 3004ce8

Browse files
authored
Completion (Zsh): fix syntax error in completion file (#1421)
A syntax error in the file caused the following output when trying to trigger completions in `zsh` (pressing <TAB>): ```zsh $ fastfetch File "<stdin>", line 15 command_prefix = f"--logo-color-{i}[{flag["desc"]} ({i})]" ^^^^ SyntaxError: f-string: unmatched '[' ``` This fix replaces single quotes with double quotes in the f-strings in lines 37 and 41.
1 parent ee8801b commit 3004ce8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

completions/fastfetch.zsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ def main():
2626
for flag in data[key]:
2727
if flag["long"] == "logo-color-[1-9]":
2828
for i in range(1, 10):
29-
command_prefix = f"--logo-color-{i}[{flag["desc"]} ({i})]"
29+
command_prefix = f"--logo-color-{i}[{flag['desc']} ({i})]"
3030
print_command(command_prefix, flag)
3131
continue
3232
3333
if flag.get("pseudo", False):
3434
continue
3535
3636
if "short" in flag:
37-
command_prefix = f"-{flag["short"]}[{flag["desc"]}]"
37+
command_prefix = f"-{flag['short']}[{flag['desc']}]"
3838
print_command(command_prefix, flag)
3939
4040
if "long" in flag:
41-
command_prefix = f"--{flag["long"]}[{flag["desc"]}]"
41+
command_prefix = f"--{flag['long']}[{flag['desc']}]"
4242
print_command(command_prefix, flag)
4343
4444

0 commit comments

Comments
 (0)