3 ms·
But if you have autocomplete suggestions enabled in your modern shell (Zsh, Fish, Nushell), you don't even have to press C-r. Just type and it'll complete for y
by gxonatano 3y ago
But if you have autocomplete suggestions enabled in your modern shell (Zsh, Fish, Nushell), you don't even have to press C-r. Just type and it'll complete for you.
- necovek 3y agoEven ignoring that those might not be built-in (at least for zsh), I can't imagine this matching unique part in the middle of a command from history without explicit action (that would be terrible UX). And when you have multiple similar commands in your history that only differ somewhere in the middle, you don't want completion, you want searching.
- gxonatano 3y agoFor those cases you can type until it autocompletes one of those commands, then press the up arrow key to cycle through the variations of that match. I don't know about zsh, but it's the default for fish and nushell.
- necovek 3y agoThe example I have top of mind is something like aws codeartifact login --tool pip ... and aws codeartifact login --tool npm ... I can simply do "C-r pip" to get to the first and "C-r npm" to get to the second (or cycle through any other matches, or if I frequently had a few, maybe do "C-r tool npm"): your suggestion sounds much worse in comparison.