flush command to history every type