Overflow in completer
When writing the completion system with reedline::Completer, I stumbled across a problem:
If I say have a path in the list of completions that's larger than the terminal's width, it overflows and makes the whole completion's behaviour messy. Notably, it will redraw the entire completion list every time another option is selected.
Would it be possible to add a new struct option that would allow to provide a text to display AND a suggestion content? The former would be displayed in the user's terminal, while the second would be the output content.
Can you clarify if this is just a messy display or a panic/inconsistent behavior caused by the overflow?
If I recall we have been cheating around some of the limitations of the current Completer trait by implementing our own Menu in nushell to get closer to the display behavior we want.
We should be revisiting that Completer/Menu split. to get less messy implementation side requirements here.
Not sure if just tacking a display option onto Suggestion is the right way to do this but investigations are welcome.
But at the moment as there are not many people actively contributing to reedline, nushell requirements will probably dominate any decisions.
Can you clarify if this is just a messy display or a panic/inconsistent behavior caused by the overflow?
If I recall we have been cheating around some of the limitations of the current
Completertrait by implementing our ownMenuin nushell to get closer to the display behavior we want. We should be revisiting thatCompleter/Menusplit. to get less messy implementation side requirements here. Not sure if just tacking a display option ontoSuggestionis the right way to do this but investigations are welcome. But at the moment as there are not many people actively contributing to reedline, nushell requirements will probably dominate any decisions.
It's just a messy display, basically the whole menu is re-drawn every time the focus goes on another option. No panic / crash / text overlap though.