add history completition based on current input