Open francogp opened 2 years ago
I added a video showing an example
Would be a great feature!
can we run it with a shortcut currently? I would love this feature!
can we run it with a shortcut currently? I would love this feature!
Yes, you can try fzf with ctrl+r.
I came across a better solution: zsh-autocomplete.
Press ↑ to open a menu with the last 16 history items. If the command line is not empty, then the contents of the command line are used to perform a fuzzy history search.
Press CtrlR to do a real-time history search listing multiple results.
I came across a better solution: zsh-autocomplete.
History menu
Press ↑ to open a menu with the last 16 history items. If the command line is not empty, then the contents of the command line are used to perform a fuzzy history search.
Fuzzy multi-line history search
Press CtrlR to do a real-time history search listing multiple results.
Like I state in the OP, I'm suggesting a way without shortcuts (i'm using ctrl+R right now to achieve similar features, but it would be nice a native feature without shortcuts)
Like I state in the OP, I'm suggesting a way without shortcuts (i'm using ctrl+R right now to achieve similar features, but it would be nice a native feature without shortcuts)
I have this set up on my zsh without needing to press Ctrl + R or any shortcut. It does actually still use autocomplete and fzf. The only thing I did was add zstyle ':autocomplete:*' default-context history-incremental-search-backward
and zstyle ':autocomplete:history-incremental-search-backward:*' min-input 1
to my zshrc.
You can type and autocomplete will latch on like normal. After executing the command, you can repeat the process without ever having to manually pressing a shortcut.
Note: if you want to regain the ability to have suggestions for os/git/build/etc. commands, you can press Ctrl + R to "disable" the list view. Press Ctrl + R again to re-enable it.
On powershell, you can use PSReadLine with options
Set-PSReadLineOption -PredictionSource History -PredictionViewStyle ListView
and you can ALWAYS show 10 rows of matching history while writing (no shortcut needed). I use it for a while, and is much useful that showing only 1 suggestion like this plugin default. Is there a way to set 5 or 6 matches in a list, always, without any shortcut, like powershell feature?Example using powershell (NOTE that I'm only writing, not using any shortcut to start/run the list)![RqjJyjWAsF](https://user-images.githubusercontent.com/2739706/152059822-759d8ba0-a3ec-4377-a04c-7e286903a83b.gif)