]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
con: enable tab completion for: which, ls, dir
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 13 Aug 2024 04:22:14 +0000 (14:22 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 12 Sep 2024 15:14:27 +0000 (01:14 +1000)
console.c

index 2da2ddc53b2d81499ad4d3c76c872afb55af4377..6e6d1b2ef7a58d71d5d11f85fe15c24b28eb2e35 100644 (file)
--- 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);