From: bones_was_here Date: Tue, 13 Aug 2024 04:22:14 +0000 (+1000) Subject: con: enable tab completion for: which, ls, dir X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=676d306187f6364374e773fc1686dc0599377d56;p=xonotic%2Fdarkplaces.git con: enable tab completion for: which, ls, dir --- diff --git a/console.c b/console.c index 2da2ddc5..6e6d1b2e 100644 --- a/console.c +++ b/console.c @@ -87,6 +87,7 @@ cvar_t con_nickcompletion_flags = {CF_CLIENT | CF_ARCHIVE, "con_nickcompletion_f cvar_t con_completion_playdemo = {CF_CLIENT | CF_ARCHIVE, "con_completion_playdemo", "*.dem", "completion pattern for the playdemo command"}; cvar_t con_completion_timedemo = {CF_CLIENT | CF_ARCHIVE, "con_completion_timedemo", "*.dem", "completion pattern for the timedemo command"}; cvar_t con_completion_exec = {CF_CLIENT | CF_ARCHIVE, "con_completion_exec", "*.cfg", "completion pattern for the exec command"}; +cvar_t con_completion_which = {CF_CLIENT | CF_ARCHIVE, "con_completion_which", "*", "completion pattern for the which, ls, and dir commands"}; cvar_t condump_stripcolors = {CF_CLIENT | CF_SERVER| CF_ARCHIVE, "condump_stripcolors", "0", "strip color codes from console dumps"}; @@ -912,6 +913,9 @@ void Con_Init (void) Cvar_RegisterVariable (&con_completion_playdemo); // *.dem Cvar_RegisterVariable (&con_completion_timedemo); // *.dem Cvar_RegisterVariable (&con_completion_exec); // *.cfg + Cvar_RegisterVariable (&con_completion_which); // * + Cvar_RegisterVirtual (&con_completion_which, "con_completion_ls"); + Cvar_RegisterVirtual (&con_completion_which, "con_completion_dir"); Cvar_RegisterVariable (&condump_stripcolors);