8.4.2
📦 clickView on GitHub →
✨ 1 features🐛 6 fixes🔧 5 symbols
Summary
Click 8.4.1 is a maintenance release fixing several bugs, including issues with Fish shell completion, help text rendering, pager streaming, and version option resolution.
✨ New Features
- A {class}`Group` with `invoke_without_command=True` now marks its subcommand as optional in the usage help, showing `[COMMAND]` instead of `COMMAND`.
🐛 Bug Fixes
- Fixed Fish shell completion broken in `8.4.0` by escaping newlines and tabs in option help text, preserving the original completion format while supporting multi-line help.
- Deprecated commands and options with empty or missing help text no longer render a stray leading space before the `(DEPRECATED)` label.
- `echo_via_pager` now flushes after each write, allowing generators to stream output incrementally to the pager.
- `echo_via_pager` and `get_pager_file` no longer close a borrowed stdout stream when no external pager runs, fixing partial `I/O operation on closed file` errors.
- Fixed CLI usage synopsis for optional arguments that produce double square brackets `[[a|b|c]]...` when their type already brackets their metavar.
- {func}`version_option` now resolves a `package_name` that does not match an installed distribution as an import (top-level module) name using `importlib.metadata.packages_distributions`, preventing `RuntimeError` for packages where the top-level module name differs from the distribution name (e.g., `PIL` vs `Pillow`).