]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Implement the find command. Basically apropos but three less characters to type
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 17 Jun 2020 23:50:14 +0000 (23:50 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 17 Jun 2020 23:50:14 +0000 (23:50 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12690 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c

diff --git a/cmd.c b/cmd.c
index 5fc5e579a2be1d2d5c2ce8864f21c497c5575c45..842d57afc75797c3b042ee909509ac94ad69e568 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -1435,7 +1435,7 @@ static void Cmd_Apropos_f(cmd_state_t *cmd)
                partial = Cmd_Args(cmd);
        else
        {
-               Con_Printf("usage: apropos <string>\n");
+               Con_Printf("usage: %s <string>\n",Cmd_Argv(cmd, 0));
                return;
        }
 
@@ -1561,6 +1561,7 @@ void Cmd_Init_Commands(qboolean dedicated_server)
        Cmd_AddCommand(CMD_SHARED, "cmdlist", Cmd_List_f, "lists all console commands beginning with the specified prefix or matching the specified wildcard pattern");
        Cmd_AddCommand(CMD_SHARED, "cvarlist", Cvar_List_f, "lists all console variables beginning with the specified prefix or matching the specified wildcard pattern");
        Cmd_AddCommand(CMD_SHARED, "apropos", Cmd_Apropos_f, "lists all console variables/commands/aliases containing the specified string in the name or description");
+       Cmd_AddCommand(CMD_SHARED, "find", Cmd_Apropos_f, "lists all console variables/commands/aliases containing the specified string in the name or description");
 
        Cmd_AddCommand(CMD_SHARED, "defer", Cmd_Defer_f, "execute a command in the future");