nushell / reedline

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

progress in recommended phrase by one word-bound #801

Open c4lliope opened 1 week ago

c4lliope commented 1 week 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 1 week 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)