Rewriting of command history