Skip to content
Snippets Groups Projects
Commit c55b2f29 authored by SteelT's avatar SteelT
Browse files

Print list of existing alias commands

parent 9a31064c
Branches
Tags
1 merge request!2055Alias improvements
...@@ -681,6 +681,17 @@ static void COM_ExecuteString(char *ptext) ...@@ -681,6 +681,17 @@ static void COM_ExecuteString(char *ptext)
// SCRIPT COMMANDS // SCRIPT COMMANDS
// ========================================================================= // =========================================================================
static void print_alias(void)
{
cmdalias_t *a;
CONS_Printf("\x82""Current alias commands:\n");
for (a = com_alias; a; a = a->next)
{
CONS_Printf("%s : %s", a->name, a->value);
}
}
/** Creates a command name that replaces another command. /** Creates a command name that replaces another command.
*/ */
static void COM_Alias_f(void) static void COM_Alias_f(void)
...@@ -692,6 +703,7 @@ static void COM_Alias_f(void) ...@@ -692,6 +703,7 @@ static void COM_Alias_f(void)
if (COM_Argc() < 3) if (COM_Argc() < 3)
{ {
CONS_Printf(M_GetText("alias <name> <command>: create a shortcut command that executes other command(s)\n")); CONS_Printf(M_GetText("alias <name> <command>: create a shortcut command that executes other command(s)\n"));
print_alias();
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment