summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py2
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+")