aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-05-19 22:13:55 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-05-19 22:13:55 -0700
commit2008415106144a3809b3b84a40f551d2ffe39472 (patch)
treecd76c9c381672b436d63c101498d2ad08dd8b5c3
parent386d6a77f2885373356bb4be4808899658d0549a (diff)
Unescape the token returned by builtin_commandline
Fixes #2075
-rw-r--r--builtin_commandline.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin_commandline.cpp b/builtin_commandline.cpp
index 339cb0d1..01bc123a 100644
--- a/builtin_commandline.cpp
+++ b/builtin_commandline.cpp
@@ -206,7 +206,9 @@ static void write_part(const wchar_t *begin,
{
case TOK_STRING:
{
- out.append(escape_string(tok_last(&tok), UNESCAPE_INCOMPLETE));
+ wcstring tmp = tok_last(&tok);
+ unescape_string_in_place(&tmp, UNESCAPE_INCOMPLETE);
+ out.append(tmp);
out.push_back(L'\n');
break;
}
@@ -230,8 +232,9 @@ static void write_part(const wchar_t *begin,
}
// debug( 0, L"woot2 %ls -> %ls", buff, esc );
-
- stdout_buffer.append(begin, end - begin);
+ wcstring tmp = wcstring(begin, end - begin);
+ unescape_string_in_place(&tmp, UNESCAPE_INCOMPLETE);
+ stdout_buffer.append(tmp);
stdout_buffer.append(L"\n");
}