Skip to content

Commit 2bcf1dd

Browse files
TimSoethoutTim Soethout
authored andcommitted
Fix: correct function and variable naming in fish completion script
1 parent a107ee4 commit 2bcf1dd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

autocomplete/fish_autocomplete

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a shell completion script auto-generated by https://github.com/urfave/cli for fish.
22

3-
function __%[1]_perform_completion
3+
function __%[1]s_perform_completion
44
# Extract all args except the last one
55
set -l args (commandline -opc)
66
# Extract the last arg (partial input)
@@ -18,18 +18,18 @@ function __%[1]_perform_completion
1818
end
1919

2020
for line in $results
21-
if not string match -q -- "%[1]*" $line
21+
if not string match -q -- "%[1]s*" $line
2222
set -l parts (string split -m 1 ":" -- "$line")
2323
if test (count $parts) -eq 2
24-
printf "%s\t%s\n" "$parts[1]" "$parts[2]"
24+
printf "%%s\t%%s\n" "$parts[1]" "$parts[2]"
2525
else
26-
printf "%s\n" "$line"
26+
printf "%%s\n" "$line"
2727
end
2828
end
2929
end
3030
end
3131

32-
# Clear existing completions for %[1]
33-
complete -c %[1] -e
32+
# Clear existing completions for %[1]s
33+
complete -c %[1]s -e
3434
# Register completion function
35-
complete -c %[1] -f -a '(__%[1]_perform_completion)'
35+
complete -c %[1]s -f -a '(__%[1]s_perform_completion)'

0 commit comments

Comments
 (0)