The Inspector Rutledge detective stories are a favorite of mine. To quote an Amazon review:
[T]he books are set in the period just after the First World War, and Inspector Rutledge is a veteran of said conflict. Even more unique, he’s haunted by the ghost of one of his subordinates, a corporal whom Rutledge had to shoot and kill after the man panicked and tried to run away during a battle. The dead man doesn’t blame Rutledge for the incident, not exactly anyway, and serves as a sort of alter ego for Rutledge. You’re never entirely certain whether Hamish MacLeod’s ghost is really there, or merely a figment of Rutledge’s imagination, given that he was horribly scarred psychologically by the war.
Hamish talks to the inspector and is often quicker to spot a problem, an inconsistency, or a wrong – “b’ware” he’ll say, or sometimes just “’ware.”