diff options
author | Ashwin Madavan <ashwin.madavan@gmail.com> | 2021-12-27 22:31:13 -0800 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2021-12-28 11:06:41 -0800 |
commit | 6f33518a82a21eb33894674501b0a04489f9c1be (patch) | |
tree | 6b1f0e0535955cf5ac0e990c32e86f4ac37fb41a | |
parent | 6987b4cdffcd995b991b7267344e938510bf7d33 (diff) | |
download | click-6f33518a82a21eb33894674501b0a04489f9c1be.tar.gz |
Update shell completion to use COMPREPLY instead of COMREPLY for Bash
-rw-r--r-- | CHANGES.rst | 3 | ||||
-rw-r--r-- | src/click/shell_completion.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index cfc9280..6348d6f 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 cad080d..1e9df6f 100644 --- a/src/click/shell_completion.py +++ b/src/click/shell_completion.py @@ -102,10 +102,10 @@ _SOURCE_BASH = """\ 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) |