Allow completers to choose partial completions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 818
- Forks
- 249
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 30
Description
Right now, with partial completions enabled, Reedline will automatically complete the common prefix of the completer's suggestions. But some completers might be using super-smart algorithms that Reedline doesn't understand, or they might need to add quotes around the partial completions.
So, completers should have the option to also return an optional partial completion with its generated suggestions. It would be a string and a span, and if the user hits TAB or whatever, the given span would be replaced with the given string.
References
None right now, I think Zsh allows this though.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Reedline's completer interface and the code that computes or applies partial completions when TAB is pressed. Trace how suggestions and spans are currently represented, then define how an optional completer-provided string and span would be carried and applied. Done means completers can supply that replacement while existing automatic common-prefix completion continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100