nethack -n
don't show the 'news' file is one is present in nethack's directory.
-nethack --nethackrc:File
- use File instead of the default run-time configuration file (which is
+nethack --nethackrc:RC-file
+ use RC-file instead of the default run-time configuration file (which is
usually '~/.nethackrc'); the file name should include full path unless
located in nethack's directory;
nethack --no-nethackrc
PERS_IS_UID\ =\ 0 or 1 to use user names or numeric userids, respectively,
to identify unique people for the score file.
.lp
+HIDEUSAGE\ =\ 0 or 1 to control whether the help menu entry for command
+line usage is shown or suppressed.
+.lp
MAX_STATUENAME_RANK\ =\ Maximum number of score file entries to use for
random statue names (default is 10).
.lp
0 or 1 to use user names or numeric userids, respectively, to identify
unique people for the score file.
%.lp
+\item[\ib{HIDEUSAGE}]
+0 or 1 to control whether the help menu entry for command
+line usage is shown or suppressed.
+%.lp
\item[\ib{MAX\verb+_+STATUENAME\verb+_+RANK}]
Maximum number of score file entries to use for
random statue names (default is 10).
* PERS_IS_UID (0 or 1 - person is name or (numeric) userid)
* Can force incubi/succubi behavior to be toned down to nymph-like:
* SEDUCE (0 or 1 - runtime disable/enable SEDUCE option)
+ * Can hide the entry for displaying command line usage from
+ * the help menu if players don't have access to command lines:
+ * HIDEUSAGE (0 or 1 - runtime show/hide command line usage)
* The following options pertain to crash reporting:
* GREPPATH (the path to the system grep(1) utility)
* GDBPATH (the path to the system gdb(1) program)
*/
#endif /* CHDIR */
-/*
- * Define HIDE_USAGE to keep the "description of command line" out of
- * the help menu if players have no access to a command line or if that
- * is radically different from the description for UNIX in dat/usagehlp
- * (a better solution for that would be a separate file and different
- * value for USAGEHELP in global.h).
- */
-/* #define HIDE_USAGE */ /* */
/*
* Section 3: Definitions that may vary with system type.
/* enable accessibility options */
int accessibility;
#ifdef WIN32
- int portable_device_paths; /* nethack configuration for a portable device */
+ int portable_device_paths; /* nethack config for a portable device */
#endif
+
+ /* nethack's interactive help menu */
+ int hideusage; /* 0: include 'command-line usage' entry in help menu;
+ * 1: suppress it */
};
extern struct sysopt sysopt;
}
sysopt.seduce = n;
sysopt_seduce_set(sysopt.seduce);
+ } else if (in_sysconf && match_varname(buf, "HIDEUSAGE", 9)) {
+ n = !!atoi(bufp);
+ sysopt.hideusage = n;
} else if (in_sysconf && match_varname(buf, "MAXPLAYERS", 10)) {
n = atoi(bufp);
/* XXX to get more than 25, need to rewrite all lock code */
static void dispfile_optmenu(void);
static void dispfile_license(void);
static void dispfile_debughelp(void);
-#ifndef HIDE_USAGE
static void dispfile_usagehelp(void);
-#endif
static void hmenu_doextversion(void);
static void hmenu_dohistory(void);
static void hmenu_dowhatis(void);
display_file(DEBUGHELP, TRUE);
}
-#ifndef HIDE_USAGE
static void
dispfile_usagehelp(void)
{
display_file(USAGEHELP, TRUE);
}
-#endif
static void
hmenu_doextversion(void)
{ dokeylist, "Full list of keyboard commands." },
{ hmenu_doextlist, "List of extended commands." },
{ domenucontrols, "List menu control keys." },
-#ifndef HIDE_USAGE
{ dispfile_usagehelp, "Description of NetHack's command line." },
-#endif
{ dispfile_license, "The NetHack license." },
{ docontact, "Support information." },
#ifdef PORT_HELP
for (i = 0; help_menu_items[i].text; i++) {
if (!wizard && help_menu_items[i].f == dispfile_debughelp)
continue;
+ if (sysopt.hideusage && help_menu_items[i].f == dispfile_usagehelp)
+ continue;
+
if (help_menu_items[i].text[0] == '%') {
Sprintf(helpbuf, help_menu_items[i].text, PORT_ID);
} else if (help_menu_items[i].f == dispfile_optmenu) {
#ifdef WIN32
sysopt.portable_device_paths = 0;
#endif
+
+ /* help menu */
+ sysopt.hideusage = 0;
+
return;
}
# numeric (1) user id.
#PERS_IS_UID=1
+# Help menu control; 0 - include "command line usage" entry in help menu;
+# 1 - suppress it from the menu. Does not affect 'nethack --usage' when
+# player has access to the command line.
+#HIDEUSAGE=0
+
# Maximum number of score file entries to use for random statue names
#MAX_STATUENAME_RANK=10