diff mcabber/mcabber/commands.c @ 1923:924f4552996c

Add a category module to complete the /module subcommands
author Mikael Berthe <mikael@lilotux.net>
date Wed, 10 Nov 2010 14:08:49 +0100
parents 7d72b7d2d93a
children 26e437e79e60
line wrap: on
line diff
--- a/mcabber/mcabber/commands.c	Wed Nov 10 14:08:24 2010 +0100
+++ b/mcabber/mcabber/commands.c	Wed Nov 10 14:08:49 2010 +0100
@@ -195,7 +195,7 @@
           COMPL_JID, COMPL_STATUS, &do_status_to);
   cmd_add("version", "Show mcabber version", 0, 0, &do_version);
 #ifdef MODULES_ENABLE
-  cmd_add("module", "Manipulations with modules", 0, 0, &do_module);
+  cmd_add("module", "Manipulations with modules", COMPL_MODULE, 0, &do_module);
 #endif
 
   // Status category
@@ -330,6 +330,14 @@
   compl_add_category_word(COMPL_COLOR, "roster");
   compl_add_category_word(COMPL_COLOR, "muc");
   compl_add_category_word(COMPL_COLOR, "mucnick");
+
+#ifdef MODULES_ENABLE
+  // Module category
+  compl_add_category_word(COMPL_MODULE, "info");
+  compl_add_category_word(COMPL_MODULE, "list");
+  compl_add_category_word(COMPL_MODULE, "load");
+  compl_add_category_word(COMPL_MODULE, "unload");
+#endif
 }
 
 //  expandalias(line)