From dd3a8ead160eaf3ae689529b7e5c1ea797c0cc77 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 8 Sep 2012 19:19:06 +0000 Subject: users/17236: r and other fc output didn't metafy when listing to a file other than stdout --- Src/builtin.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Src/builtin.c') 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) { -- cgit 1.4.1