diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-06-07 13:12:31 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-06-07 13:12:31 -0400 |
commit | dbb82eecf98de82bd6dc060b2155b4c7d296cfcb (patch) | |
tree | 7a31b4e2dd7c411a38850e4bd23b21dbdbaaadee /cmd2/cmd2.py | |
parent | dbeef111ca56b5b74eae20a2e0915e87f842829b (diff) | |
download | cmd2-git-dbb82eecf98de82bd6dc060b2155b4c7d296cfcb.tar.gz |
Allowing quoted paths when piping and redirecting
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 282d2117..19bb4319 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -1840,7 +1840,7 @@ class Cmd(cmd.Cmd): # REDIRECTION_APPEND or REDIRECTION_OUTPUT if statement.output == constants.REDIRECTION_APPEND: mode = 'a' - sys.stdout = self.stdout = open(os.path.expanduser(shlex.split(statement.output_to)[0]), mode) + sys.stdout = self.stdout = open(statement.output_to, mode) else: # going to a paste buffer sys.stdout = self.stdout = tempfile.TemporaryFile(mode="w+") |