By default that doesn't seem to pay attention to the current directory or the directories commands were run in. Is that a configuration option or something?
No but it would be very straightforward to do something like what the OP does, and then instead of using tail you just pipe the grep result for PWD into fzf. Which has some advantages: all commands instead of last n, plus of course the killer feature which is fuzzy matching.