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 --- ChangeLog | 7 ++++++- Doc/META-FAQ.yo | 2 +- Src/builtin.c | 8 ++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a546a3f50..eecf65d42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-08 Peter Stephenson + + * users/17236: Src/builtin.c: r and other fc output didn't + unmetafy when listing to a file other than stdout. + 2012-09-06 Peter Stephenson * 30656: Src/math.c: treat dividing by -1 the same as @@ -142,5 +147,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5716 $ +* $Revision: 1.5717 $ ***************************************************** diff --git a/Doc/META-FAQ.yo b/Doc/META-FAQ.yo index bfdb76b77..642f4c3b3 100644 --- a/Doc/META-FAQ.yo +++ b/Doc/META-FAQ.yo @@ -12,7 +12,7 @@ def(texinode)(4)(DELLINE) def(cindex)(1)(DELLINE) def(sect)(1)( -SECTHEAD +SECTHEAD+CHAR(10) ARG1 ) 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