back

by JNRowe·3y ago·view on hn ↗
That is the difference between the up-line-or-history and up-line-or-search functions that I linked above. The default Up binding is the -history function, whereas the -search function in unbound by default. There are pattern variants too, if you don't like the prefix only checks.

If you also need to mimic the fish behaviour of C-r mid-command because your suggestion wasn't correct, then that does need a custom function to bind to C-r as you have to provide ${L,}BUFFER to populate the search pattern like fish does.

1 comments
ah, thank you. that actually helps a lot. i don't use zsh as much, but it's good to know that this feature is available. i don't use ctrl-R in fish yet, so i won't miss that.