Implementing +history command