- Con_Printf ("Press a key.\n");
- Con_Printf("\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n");
+ if (c + v + a == 1) {
+ if (c)
+ list[0] = Cmd_CompleteBuildList(s);
+ else if (v)
+ list[0] = Cvar_CompleteBuildList(s);
+ else
+ list[0] = Cmd_CompleteAliasBuildList(s);
+ cmd = *list[0];
+ cmd_len = strlen (cmd);
+ } else {
+ if (c)
+ cmd = *(list[0] = Cmd_CompleteBuildList(s));
+ if (v)
+ cmd = *(list[1] = Cvar_CompleteBuildList(s));
+ if (a)
+ cmd = *(list[2] = Cmd_CompleteAliasBuildList(s));
+
+ cmd_len = strlen (s);
+ do {
+ for (i = 0; i < 3; i++) {
+ char ch = cmd[cmd_len];
+ const char **l = list[i];
+ if (l) {
+ while (*l && (*l)[cmd_len] == ch)
+ l++;
+ if (*l)
+ break;
+ }
+ }
+ if (i == 3)
+ cmd_len++;
+ } while (i == 3);
+ // 'quakebar'
+ Con_Printf("\n\35");
+ for (i = 0; i < con_linewidth - 4; i++)
+ Con_Printf("\36");
+ Con_Printf("\37\n");
+
+ // Print Possible Commands
+ if (c) {
+ Con_Printf("%i possible command%s\n", c, (c > 1) ? "s: " : ":");
+ Con_DisplayList(list[0]);
+ }