Hi Branden, On Tue, 12 Jul 2022 09:40:52 -0500, G. Branden Robinson wrote: > At 2018-06-20T11:33:25+0200, Jean Delvare wrote: > > On Sat, 16 Jun 2018 12:22:39 -0400, g.branden.robin...@gmail.com wrote: > > > When a "literal" ASCII 45 hyphen-minus character is desired, it has > > > to be escaped; this is a requirement going all the way back to Bell > > > Labs Troff, but is frequently overlooked. Getting it right enables > > > accurate cut-and-paste of code examples, filenames, URLs, and so > > > forth from roff documents prepared for UTF-8 terminal and PDF > > > output, possibly among others. > > > > > > See section 2.1 of CSTR #54, "Troff User's Manual", Ossanna & > > > Kernighan <https://www.troff.org/54.pdf>. > > > > I'm curious why hyphens must be double-escaped (\\) while > > double-quotes are only escaped once (\)? > > That appears to be an error on my part. The extra layer of > backslash-escaping is necessary because the quilt.1 file is generated by > make using target rules that process quilt.1.in using the shell's 'read' > and 'echo' built-in commands. > > A quick experiment reveals that extra escaping is needed in both cases. > At least with Bash. I'd be nervous about assuming other shells will > behave exactly the same, even if they claim POSIX-conformance. > > $ cat > infile > foo\\bar > foo\"bar > $ while read line; do echo "$line"; done < infile > foo\bar > foo"bar > > The second line certainly does not remain a *roff comment.
OK, thanks for the explanation. That being said, my initial question wasn't that good. The real question isn't why double quotes were escaped only once, by why they were escaped at all. As I understand it, escaped double quotes are meant to introduce comments, which is *not* the case here: > The special value \"\\-\" causes quilt not to read any configuration > file. So I believe these escapes should be have been removed (leading to "\\-"). Not that it utterly matters though, as patch 9/26 is replacing them with directional quotes anyway, so problem solved. -- Jean Delvare SUSE L3 Support _______________________________________________ Quilt-dev mailing list Quilt-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/quilt-dev