command-line: fix checking history

it was droped previous PR