From dbb82eecf98de82bd6dc060b2155b4c7d296cfcb Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Thu, 7 Jun 2018 13:12:31 -0400 Subject: Allowing quoted paths when piping and redirecting --- cmd2/cmd2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd2/cmd2.py') 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+") -- cgit v1.2.1