nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
551 stars 155 forks source link

progress in recommended phrase by one word-bound #801

Closed c4lliope closed 1 week ago

c4lliope commented 5 months ago

(cursor is marked using |...)

~> shell $machine.base| ls /home/user/some/place

In reedline I can use [tab] and see many recommended commands, or [->] and use the single recommended one rendered semi-opaque on the engaged command line.

Can I skip ahead in the recommendation, phrase by phrase? I'm sure anyone can imagine motion bindings already, so maybe a keybinding option? May already be in place; in case so, sorry.

sholderbach commented 5 months ago

This is provided in the default mappings with Ctrl-Right or as the ReedlineEvent::HistoryHintWordComplete for the greyed out hints. Those are history autosuggestions as provided by us (there is the possibility of implementing a Hinter for other completion sources). For the items for the tabcompletion list we do not have a token by token mechanism so far (challenging regarding UX when it should walk through the list vs when it should move through tokens)

sholderbach commented 1 week ago

As mentioned Ctrl-RightArrow should get you there if I understood your request correctly