diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-02-22 12:50:00 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-02-22 12:50:00 -0500 |
commit | 7b1b8b10e35b57a813369c9b23876d3615213026 (patch) | |
tree | b33b008087d1b1ef6763f9a63e928721ad006e8a /cmd2/cmd2.py | |
parent | f69b2558389f96e14a2150c656d59e9df349a670 (diff) | |
download | cmd2-git-7b1b8b10e35b57a813369c9b23876d3615213026.tar.gz |
Restored called to expanduser in do_edit() instead of relying on do_shell() to do it.0.9.10
This should prevent issues if someone has an overridden do_shell() that doesn't expand ~ in paths.
Diffstat (limited to 'cmd2/cmd2.py')
-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 15175123..03fc719e 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -3356,9 +3356,9 @@ class Cmd(cmd.Cmd): if not self.editor: raise EnvironmentError("Please use 'set editor' to specify your text editing program of choice.") - command = utils.quote_string_if_needed(self.editor) + command = utils.quote_string_if_needed(os.path.expanduser(self.editor)) if args.file_path: - command += " " + utils.quote_string_if_needed(args.file_path) + command += " " + utils.quote_string_if_needed(os.path.expanduser(args.file_path)) self.do_shell(command) |