Reimplement command-prompt history