Skip to content

Commit

Permalink
completion works for expose_value=False
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Jul 6, 2023
1 parent 5499471 commit 4cf7c6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Unreleased
- Remove outdated and unnecessary detection of App Engine environment. :pr:`2554`
- ``echo()`` does not fail when no streams are attached, such as with ``pythonw`` on
Windows. :issue:`2415`
- Argument with ``expose_value=False`` do not cause completion to fail. :issue:`2336`


Version 8.1.3
Expand Down
3 changes: 2 additions & 1 deletion src/click/shell_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ def _is_incomplete_argument(ctx: Context, param: Parameter) -> bool:
return False

assert param.name is not None
value = ctx.params[param.name]
# Will be None if expose_value is False.
value = ctx.params.get(param.name)
return (
param.nargs == -1
or ctx.get_parameter_source(param.name) is not ParameterSource.COMMANDLINE
Expand Down

0 comments on commit 4cf7c6c

Please sign in to comment.