Changelog – Version 4.2.1
This patch release fixes edge cases in tab-completion behavior for hierarchical commands registered via CommandTree.
It ensures suggestions are accurate and context-aware based on cursor position and partially typed input.
Bug Fixes
Improved Tab-Completion Suggestions
- Fixed incorrect suggestions when the cursor is placed immediately after a valid argument without a trailing space (e.g. /test sub<CURSOR>):
- Suggestions now differentiate between:
- Cursor at end of argument ➜ sibling and matching suggestions.
- Cursor after space ➜ child/subcommand suggestions.
- Handled partial alias paths consistently:
- Suggestions work correctly for commands registered under aliases (e.g. "parent.child") and their subcommands.
Internal Improvements
- Refactored fallback suggestion logic in CommandInvoker#suggest(...):
- Clean separation of "argument-in-progress" vs "ready for next argument" cases.
Migration Notes
This is a non-breaking patch release:
- No API changes.
- No migration required.
Full Changelog:
4.2.0...4.2.1