diff --git a/CHANGES.rst b/CHANGES.rst index cfc92808a..6348d6f25 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ Unreleased annotation of the decorated function. :pr:`2155` - A callable default value can customize its help text by overriding ``__str__`` instead of always showing ``(dynamic)``. :issue:`2099` +- Fix a typo in the Bash completion script that affected file and + directory completion. If this script was generated by a previous + version, it should be regenerated. :issue:`2163` Version 8.0.3 diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py index cad080da6..1e9df6f94 100644 --- a/src/click/shell_completion.py +++ b/src/click/shell_completion.py @@ -102,10 +102,10 @@ def __getattr__(self, name: str) -> t.Any: IFS=',' read type value <<< "$completion" if [[ $type == 'dir' ]]; then - COMREPLY=() + COMPREPLY=() compopt -o dirnames elif [[ $type == 'file' ]]; then - COMREPLY=() + COMPREPLY=() compopt -o default elif [[ $type == 'plain' ]]; then COMPREPLY+=($value)