summaryrefslogtreecommitdiff
path: root/src/click/shell_completion.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2020-10-03 13:48:08 -0700
committerDavid Lord <davidism@gmail.com>2020-10-03 13:48:14 -0700
commit1b9a657efe2de8e1b7084e3c6149d70bc0736d60 (patch)
tree1631f0e4d0f6a32d17f49f52fc882c1d35c5588b /src/click/shell_completion.py
parent3faede8b430ef88f36d3efa513f5e4065a3f3a7e (diff)
downloadclick-1b9a657efe2de8e1b7084e3c6149d70bc0736d60.tar.gz
don't pass all args to shell_complete methods
Diffstat (limited to 'src/click/shell_completion.py')
-rw-r--r--src/click/shell_completion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py
index 8152f00..2ce3eb9 100644
--- a/src/click/shell_completion.py
+++ b/src/click/shell_completion.py
@@ -244,7 +244,7 @@ class ShellComplete:
return []
obj, incomplete = _resolve_incomplete(ctx, args, incomplete)
- return obj.shell_complete(ctx, args, incomplete)
+ return obj.shell_complete(ctx, incomplete)
def format_completion(self, item):
"""Format a completion item into the form recognized by the
@@ -443,7 +443,7 @@ def _is_incomplete_option(args, param):
if _start_of_option(arg):
last_option = arg
- return bool(last_option and last_option in param.opts)
+ return last_option is not None and last_option in param.opts
def _resolve_context(cli, prog_name, args):