Add support of history and dir commands