Skip to content

Commit

Permalink
add back semicolons in fish script
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdragun authored and davidism committed Aug 17, 2023
1 parent a260ca6 commit 3c1529e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/click/shell_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,25 @@ def __getattr__(self, name: str) -> t.Any:
"""

_SOURCE_FISH = """\
function %(complete_func)s
function %(complete_func)s;
set -l response (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) \
COMP_CWORD=(commandline -t) %(prog_name)s)
COMP_CWORD=(commandline -t) %(prog_name)s);
for completion in $response
set -l metadata (string split "," $completion)
for completion in $response;
set -l metadata (string split "," $completion);
if test $metadata[1] = "dir"
__fish_complete_directories $metadata[2]
else if test $metadata[1] = "file"
__fish_complete_path $metadata[2]
else if test $metadata[1] = "plain"
echo $metadata[2]
end
end
end
if test $metadata[1] = "dir";
__fish_complete_directories $metadata[2];
else if test $metadata[1] = "file";
__fish_complete_path $metadata[2];
else if test $metadata[1] = "plain";
echo $metadata[2];
end;
end;
end;
complete --no-files --command %(prog_name)s --arguments \
"(%(complete_func)s)"
"(%(complete_func)s)";
"""


Expand Down

0 comments on commit 3c1529e

Please sign in to comment.