MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / do_edit

Method do_edit

cmd2/cmd2.py:5429–5432  ·  view source on GitHub ↗

Run a text editor and optionally open a file with it.

(self, args: argparse.Namespace)

Source from the content-addressed store, hash-verified

5427
5428 @with_argparser(_build_edit_parser)
5429 def do_edit(self, args: argparse.Namespace) -> None:
5430 """Run a text editor and optionally open a file with it."""
5431 # self.last_result will be set by do_shell() which is called by run_editor()
5432 self.run_editor(args.file_path)
5433
5434 def run_editor(self, file_path: str | None = None) -> None:
5435 """Run a text editor and optionally open a file with it.

Callers

nothing calls this directly

Calls 1

run_editorMethod · 0.95

Tested by

no test coverage detected