Not sure I'm wording the question very well, but an example is worth a thousand words of mine. eg., using oh-my-zsh :
git <up arrow>
Will cycle up all the
git commands I have used...
git rebase brancha git commit foo git rebase branchb etc
Is there a way to limit that history to the second/third word given. eg.
git rebase <up arrow>
To only cycle through
git rebase commands :
git rebase brancha git rebase branchb