diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-05-25 11:25:32 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-05-25 11:25:32 -0400 |
| commit | 039ef2972e70c0ec7e2db1e47eac2b84815aa1b3 (patch) | |
| tree | 95a79a3958570817ce13dae0dc9704d82c9844a7 /cmd2 | |
| parent | 21cdab4babfbd0363052dcaea06455c80911024b (diff) | |
| download | cmd2-git-039ef2972e70c0ec7e2db1e47eac2b84815aa1b3.tar.gz | |
Updated documentation. Added support for calling cmd2.Cmd.run_editor() with no argument.
Diffstat (limited to 'cmd2')
| -rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 0916c288..f8a73172 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -4634,11 +4634,11 @@ class Cmd(cmd.Cmd): """Run a text editor and optionally open a file with it""" self.run_editor(args.file_path) - def run_editor(self, file_path: Optional[str]) -> None: + def run_editor(self, file_path: Optional[str] = None) -> None: """ Run a text editor and optionally open a file with it - :param file_path: optional path of the file to edit + :param file_path: optional path of the file to edit. Defaults to None. :raises: EnvironmentError if self.editor is not set """ if not self.editor: |
