Skip to content
Brett Terpstra edited this page Jan 12, 2022 · 2 revisions

Doing maintains a version history that can be used to undo commands if you get unexpected results or just want to re-enter something. The history is updated every time a command is run that affects the doing file by adding, modifying, or deleting entries.

Running doing undo will revert the doing file to the state prior to running the last modifying command. This can be used successively to step back in history. To jump back several r at once, you can add an integer argument: doing undo 5 will undo the last 5 commands.

The number of versions stored is configurable with the history_size setting. By default, Doing stores 15 versions of your file. If you want to save on disk space, lower the number. If you're experimenting with automating Doing and worry that something might go wrong in the background, give yourself a larger undo stack.

The undo command has an interactive mode. Run doing undo --interactive (or doing undo -i) to view a menu of available versions, listed by the date at which the modification they represent was made. On the right of the menu is a diff view of the version against the current state. Navigate with arrow keys. Select a revision by pressing return and the current state of the doing file will be reverted to the selected time. Entries newer than the selected revision will be deleted.

If you run a doing undo command that you immediately regret, you can use doing redo to undo the undo. This only works once, and you can't undo a redo. But if you've just performed an undo, running doing redo will restore the state of the file to what it was before the undo command.

By default, Doing stores its backup files in ~/.doing_backup. If for any reason you'd prefer a different location, you can set a path in your Configuration:

backup_dir: ~/my_path/doing_backups