On 06/14/2011 12:54 PM, Jason McIntyre wrote: > On Tue, Jun 14, 2011 at 09:59:22AM +0100, Stuart Henderson wrote: >> On 2011/06/14 09:33, Florian Obser wrote: >>> anyone? >> >> This is just how it works. >> >> http://thread.gmane.org/gmane.os.openbsd.misc/144553/focus=144586 >> >>>> but doesn't explain the semantics of continuation lines. I don't feel >>>> qualified to provide a patch for pf.conf(5). >> >> How about this? I tried a few wordings to explain it but none >> were right, so it seems clearest with an example. >> >> Lines can be joined using a backslash (`\'), for example: >> >> pass log proto tcp \ >> to port http # this \ >> is all one \ >> line. >> > > i'm surprised we don;t actually document that. i guess it's something > that you instinctively understand, especially since the whole page uses > this notation.
Right, I instinctively understood that everything after a hash mark is ignored - which is wrong here but which is what ksh does for example. In the misc thread Stuart sent me, Philip Guenther has a nice list of different behaviour ( http://article.gmane.org/gmane.os.openbsd.misc/144586 ) > > if you want to document it, i'd prefer to try and tuck it in nice and > neat, without an example. how about rearranging the section to something > like this: > > Comments can be put anywhere in the file using a hash mark > (`#'), and extend to the end of the current line. The > current line itself can be extended using a backslash (`\'). > > Additional configuration files can be included with the > include keyword, for example: > > include "/etc/pf/sub.filter.conf" > > ... > > that would be just a one line addition. > > i'd prefer to try and keep this little blurb short, as i think we > should expect readers to understand the idea of `#' as comments, > and `\' as extending the current line. > Right. The problem is what happens when you combine `#' and `\' on the same line. pf.conf does one thing, extending the comment. ksh (for example) does something else, ignoring/commenting the `\'. I'm not sure if your addition captures this distinction. [...] > > jmc > Thanks, Florian