Splitted cd into cd and cd_history.