history and restore commands (but no tests yet)