correct history auto completion