Skip to content
Myr

completion(fish): add back ; as line endings in fish script (#2570)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by GitHub · parents a260ca6, a955c77 · Browse files · 3 files+16 added−15 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+16 added−15 removed

  • other:+16 added−15 removed

3 files+16 added−15 removed

modified:docs/shell-completion.rst+1 added-1 removed
60 unmodified lines
61 Add this to ``~/.config/fish/completions/foo-bar.fish``:6263 .. code-block:: fish6465 eval (env _FOO_BAR_COMPLETE=fish_source foo-bar)65 _FOO_BAR_COMPLETE=fish_source foo-bar | source6667 This is the same file used for the activation script method68 below. For Fish it's probably always easier to use that method.69
218 unmodified lines
modified:src/click/shell_completion.py+14 added-14 removed
165 unmodified lines
166fi167"""168169_SOURCE_FISH = """\170function %(complete_func)s170function %(complete_func)s;171 set -l response (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) \172COMP_CWORD=(commandline -t) %(prog_name)s)172COMP_CWORD=(commandline -t) %(prog_name)s);173174 for completion in $response175 set -l metadata (string split "," $completion)174 for completion in $response;175 set -l metadata (string split "," $completion);176177 if test $metadata[1] = "dir"178 __fish_complete_directories $metadata[2]179 else if test $metadata[1] = "file"180 __fish_complete_path $metadata[2]181 else if test $metadata[1] = "plain"182 echo $metadata[2]183 end184 end185end177 if test $metadata[1] = "dir";178 __fish_complete_directories $metadata[2];179 else if test $metadata[1] = "file";180 __fish_complete_path $metadata[2];181 else if test $metadata[1] = "plain";182 echo $metadata[2];183 end;184 end;185end;186187complete --no-files --command %(prog_name)s --arguments \188"(%(complete_func)s)"188"(%(complete_func)s)";189"""190191192class ShellComplete:
404 unmodified lines
modified:CHANGES.rst+1 added
5 unmodified lines
6Unreleased78- Fix issue with regex flags in shell completion. :issue:`2581`9- Bash version detection issues a warning instead of an error. :issue:`2574`10- Fix issue with completion script for Fish shell. :issue:`2567`111213Version 8.1.614-------------
1092 unmodified lines