Change some command keys

Change 'v' from #versionshort to #chronicle.
Change 'V' from #history to #versionshort.
History can still be accessed either directly with the extended command,
or via the help menu.
Versionshort now accepts the m-prefix, and then shows the longer version.
This commit is contained in:
Pasi Kallinen
2026-03-21 17:54:16 +02:00
parent 1eadfa962d
commit 8e4c7f9fb5
6 changed files with 16 additions and 11 deletions

View File

@@ -1690,7 +1690,7 @@ struct ext_func_tab extcmdlist[] = {
docast, IFBURIED, NULL },
{ M('c'), "chat", "talk to someone",
dotalk, IFBURIED | AUTOCOMPLETE, NULL },
{ '\0', "chronicle", "show journal of major events",
{ 'v', "chronicle", "show journal of major events",
do_gamelog, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL },
{ 'c', "close", "close a door",
doclose, 0, NULL },
@@ -1735,7 +1735,7 @@ struct ext_func_tab extcmdlist[] = {
dohelp, IFBURIED | GENERALCMD, NULL },
{ '\0', "herecmdmenu", "show menu of commands you can do here",
doherecmdmenu, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL },
{ 'V', "history", "show long version and game history",
{ '\0', "history", "show long version and game history",
dohistory, IFBURIED | GENERALCMD, NULL },
{ 'i', "inventory", "show your inventory",
ddoinv, IFBURIED | GENERALCMD, NULL },
@@ -1923,8 +1923,8 @@ struct ext_func_tab extcmdlist[] = {
{ M('v'), "version",
"list compile time options for this version of NetHack",
doextversion, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL },
{ 'v', "versionshort", "show version and date+time program was built",
doversion, IFBURIED | GENERALCMD, NULL },
{ 'V', "versionshort", "show version and date+time program was built",
doversion, IFBURIED | GENERALCMD | CMD_M_PREFIX, NULL },
{ '\0', "vision", "show vision array",
wiz_show_vision, IFBURIED | AUTOCOMPLETE | WIZMODECMD, NULL },
{ '.', "wait", "rest one move while doing nothing",

View File

@@ -157,6 +157,9 @@ doversion(void)
{
char buf[BUFSZ];
if (iflags.menu_requested)
return doextversion();
pline("%s", getversionstring(buf, sizeof buf));
return ECMD_OK;
}