Add special shell character handling to history