Check it out, pretty cool I must say.
I use the following to get a similar result (no history though) in my zsh
CDPATH='.:~:/media/wdblue/git/archlabs:/media/wdblue/git/personal:/media/wdblue' setopt AUTO_CD
Then I can cd like
% installer /media/wdblue/git/archlabs/installer % ls installer* README.md % ~
Might give this a try though
It’s not bad. I like your method too.