Voice et bot modif
This commit is contained in:
parent
189d56026b
commit
7333a22bcd
10774 changed files with 634644 additions and 933308 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import sys
|
||||
import textwrap
|
||||
from optparse import Values
|
||||
from typing import List
|
||||
|
||||
from pip._internal.cli.base_command import Command
|
||||
from pip._internal.cli.status_codes import SUCCESS
|
||||
|
|
@ -37,18 +38,12 @@ COMPLETION_SCRIPTS = {
|
|||
""",
|
||||
"fish": """
|
||||
function __fish_complete_pip
|
||||
set -lx COMP_WORDS \\
|
||||
(commandline --current-process --tokenize --cut-at-cursor) \\
|
||||
(commandline --current-token --cut-at-cursor)
|
||||
set -lx COMP_CWORD (math (count $COMP_WORDS) - 1)
|
||||
set -lx COMP_WORDS (commandline -o) ""
|
||||
set -lx COMP_CWORD ( \\
|
||||
math (contains -i -- (commandline -t) $COMP_WORDS)-1 \\
|
||||
)
|
||||
set -lx PIP_AUTO_COMPLETE 1
|
||||
set -l completions
|
||||
if string match -q '2.*' $version
|
||||
set completions (eval $COMP_WORDS[1])
|
||||
else
|
||||
set completions ($COMP_WORDS[1])
|
||||
end
|
||||
string split \\ -- $completions
|
||||
string split \\ -- (eval $COMP_WORDS[1])
|
||||
end
|
||||
complete -fa "(__fish_complete_pip)" -c {prog}
|
||||
""",
|
||||
|
|
@ -118,7 +113,7 @@ class CompletionCommand(Command):
|
|||
|
||||
self.parser.insert_option_group(0, self.cmd_opts)
|
||||
|
||||
def run(self, options: Values, args: list[str]) -> int:
|
||||
def run(self, options: Values, args: List[str]) -> int:
|
||||
"""Prints the completion code of the given shell"""
|
||||
shells = COMPLETION_SCRIPTS.keys()
|
||||
shell_options = ["--" + shell for shell in sorted(shells)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue