Skip to content

Consolidate functionality of editing, saving, and showing the history of commands entered #252

@kotfu

Description

@kotfu

The do_history() command allows you to search and slice history before displaying it. The do_save() command doesn't, but it will save history to a file. The do_edit() command lets you edit one history item and then run it. We should consolidate all the history functionality into a single command.

  • Add a -o/--output-file argument to do_history() which writes the selected history item(s) to the given file
  • Remove the do_save() method and it's associated tests
  • Add a -r/--run argument to do_history() to run the selected command(s)
  • Remove the do_run() method and it's associated tests
  • Add a -e/--edit argument to do_history() to let you edit the selected history item(s) in an editor. Run the contents of the edited file when the editor exits.
  • Modify do_edit() to not edit commands from history, just to edit files
  • Remove _last_matching() method
  • Remove autorun_on_edit attribute and setting

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions