malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.23k stars 30 forks source link

Reverse search through history? #87

Open flriancu opened 3 years ago

flriancu commented 3 years ago

Hi!

There is a high chance that I just didn't manage to find the relevant documentation/discussion, but I can't figure out if yori supports reverse search (like ctrl+r in bash or in clink). Any help is appreciated. Thanks!

malxau commented 3 years ago

Ctrl+R has been in the backlog for a while: https://github.com/malxau/yori/blob/b2a884d21cd4d0fcb9c1448197162adb451b1f9e/TODO#L10

What does exist is Ctrl+Up which is a prefix match through history - type a few chars, hit Ctrl+Up to see commands that started with the same characters.

There's also a history command, which displays history, and could be piped to findstr to find candidates. These won't be entered into the input line buffer though. There's also history -u which displays history in an interactive list, which might be a good thing to use for Ctrl+R when implementing it.