Yes, a linear weighting of factors would be perfectly fine.
But we're in 2020. A small two-layer MLP has a negligible impact when compared to the work to (e.g.) output the current git branch at every command prompt.
What does overkill mean? I think unless shell history search is a "solved problem", which I don't believe is possible, there isn't such a thing as overkill.