Problem:
In the terminal, when I press Ctrl+R to do a backward-search using the zsh/bash history, it searches all commands sorted by most recently used.
Problem is some commands are completely irrelevant to my current directory.
Is there a zsh/bash plugin or a way to configure the backward-search to take into account the timestamp AND the relative directory path in order to display relevant commands that I've previously typed in this directory?