* Move command argument completion from being hard coded to being associated

with the individual commands to be completed
This commit is contained in:
Tim Angus 2008-09-16 21:05:22 +00:00
parent 47ee177430
commit 130c0c6575
8 changed files with 195 additions and 89 deletions

View file

@ -302,6 +302,17 @@ void Con_CheckResize (void)
con.display = con.current;
}
/*
==================
Cmd_CompleteTxtName
==================
*/
void Cmd_CompleteTxtName( char *args, int argNum ) {
if( argNum == 2 ) {
Field_CompleteFilename( "", "txt", qfalse );
}
}
/*
================
@ -329,6 +340,7 @@ void Con_Init (void) {
Cmd_AddCommand ("messagemode4", Con_MessageMode4_f);
Cmd_AddCommand ("clear", Con_Clear_f);
Cmd_AddCommand ("condump", Con_Dump_f);
Cmd_SetCommandCompletionFunc( "condump", Cmd_CompleteTxtName );
}