Difference between zsh-history-substring-search and up-line-or-beginning-search

command historyzsh

Is there a practical difference between history-substring-search-up and up-line-or-beginning-search? I've tried both out and they effectively seem to do the same thing (besides some highlighting that history-substring-search does).

Best Answer

history-substring-search takes the whole editing buffer and returns any history lines that contain it anywhere as a substring.

up-line-or-beginning-search takes only the part of the editing buffer that's to the left of the cursor and returns any history lines that begin with it.


PS: For more advanced/interactive versions of these features, check out the zsh-autocomplete plugin.

history search

Related Question