Prevent duplicate commands from stacking up in interactive history