summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-09-08 19:19:06 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-09-08 19:19:06 +0000
commitdd3a8ead160eaf3ae689529b7e5c1ea797c0cc77 (patch)
tree4b48fa1690d9e8c9c075b967441739967dabb5cb /Src/builtin.c
parent361e1716729a34d19aa8bace4e6be44c295c3e1d (diff)
downloadzsh-dd3a8ead160eaf3ae689529b7e5c1ea797c0cc77.tar.gz
zsh-dd3a8ead160eaf3ae689529b7e5c1ea797c0cc77.zip
users/17236: r and other fc output didn't metafy when listing to a file
other than stdout
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 3925edd10..d8493bb8a 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1727,8 +1727,12 @@ fclist(FILE *f, Options ops, zlong first, zlong last,
if (f == stdout) {
nicezputs(s, f);
putc('\n', f);
- } else
- fprintf(f, "%s\n", s);
+ } else {
+ int len;
+ unmetafy(s, &len);
+ fwrite(s, 1, len, f);
+ putc('\n', f);
+ }
}
/* move on to the next history line, or quit the loop */
if (first < last) {