From 1a8a774719abe55b5a57f63cc43f183339dc6433 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 11 Feb 2019 16:30:46 -0800 Subject: [PATCH] Guidebook tweak - options parsing --- doc/Guidebook.mn | 15 +++++++++++---- doc/Guidebook.tex | 11 ++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index bab1e63f1..75f4730d0 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.292 $ $NHDT-Date: 1546984605 2019/01/08 21:56:45 $ +.\" $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.296 $ $NHDT-Date: 1549931433 2019/02/12 00:30:33 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -2638,15 +2638,15 @@ Prefix a boolean option with \(lqno\(rq or \(oq!\(cq to turn it off. For compound options, the option name and value are separated by a colon. Some options are persistent, and apply only to new games. You can specify multiple OPTIONS statements, and multiple options -in a single OPTIONS statement. +separated by commas in a single OPTIONS statement. +(Comma separated options are processed from right to left.) .pg Example: .sd .ft CR OPTIONS=dogname:Fido .\" '\(dq' == double quote; including a literal double quote here works -.\" for formatting but confuses Emacs' nroff-mode into thinking -.\" that the \fP is part of a string rather than a font toggle +.\" for formatting but confuses Emacs' nroff-mode OPTIONS=!legacy,autopickup,pickup_types:$\(dq=/!?+ .ft .ed @@ -2802,6 +2802,13 @@ to that shell), or the pair of commands .ED in \fIsh\fP, \fIksh\fP, or \fIbash\fP. .pg +The NETHACKOPTIONS value is effectively the same as a single OPTIONS +statement in a configuration file. +The \(lqOPTIONS=\(rq prefix is implied and comma separated options are +processed from right to left. +Other types of configuration statements such as BIND or MSGTYPE are +not allowed. +.pg Instead of a comma-separated list of options, NETHACKOPTIONS can be set to the full name of a configuration file you want to use. diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 5011da014..a6d433b07 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2885,7 +2885,8 @@ Prefix a boolean option with `no' or `!' to turn it off. For compound options, the option name and value are separated by a colon. Some options are persistent, and apply only to new games. You can specify multiple OPTIONS statements, and multiple options -in a single OPTIONS statement. +separated by commas in a single OPTIONS statement. +(Comma separated options are processed from right to left.) %.pg Example: @@ -3075,6 +3076,14 @@ to that shell), or the pair of commands \nd in {\it sh}, {\it ksh}, or {\it bash}. +%.pg +The NETHACKOPTIONS value is effectively the same as a single OPTIONS +statement in a configuration file. +The ``OPTIONS='' prefix is implied and comma separated options are +processed from right to left. +Other types of configuration statements such as BIND or MSGTYPE are +not allowed. + %.pg Instead of a comma-separated list of options, NETHACKOPTIONS can be set to the full name of a configuration file you