reedline icon indicating copy to clipboard operation
reedline copied to clipboard

Moved partial completion menu next into new menu event

Open uek-1 opened this issue 10 months ago • 2 comments

Addresses nushell/nushell#14152 (more context can also be found in #828 ). Creates a separate event, MenuNextComplete, that not only selects the next element but also attempts to partially complete the selection. Reverts MenuNext to simply advancing the next element and quick completing if possible.

The nushell PR to use this new event can be found at nushell/nushell#15063

uek-1 avatar Feb 08 '25 23:02 uek-1

is there a use case for sending MenuNext without completing? not sure if we should have a new event for this, or just change the behavior of MenuNext. but i'm not super familiar with the completion stuff. (cc @blindFS, @ysthakur)

132ikl avatar Feb 14 '25 15:02 132ikl

@132ikl I'd like this because when the only valid options are say foo and foooo, a typical bash behavior of f#tab would complete the repl text to foo without moving the menu item towards foooo

Sorry I didn't check the code, it seems different from what I thought. @uek-1 I was thinking about a new event with only the partial match blabla side effects (which will cause the repl text to change?), and no next item move. And we can set tab to be any of those events handled first, so the foo example will behave as expected?

blindFS avatar Feb 14 '25 16:02 blindFS