about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command/command.c7
-rw-r--r--src/command/command.h1
-rw-r--r--src/plugins/callbacks.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 8d754033..3defbfee 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -2658,8 +2658,13 @@ cmd_autocomplete_add(const char *const value)
     if (commands_ac) {
         autocomplete_add(commands_ac, value);
     }
+}
+
+void
+cmd_help_autocomplete_add(const char *const value)
+{
     if (help_ac) {
-        autocomplete_add(help_ac, &value[1]);
+        autocomplete_add(help_ac, value);
     }
 }
 
diff --git a/src/command/command.h b/src/command/command.h
index 9ead8a27..656e2221 100644
--- a/src/command/command.h
+++ b/src/command/command.h
@@ -47,6 +47,7 @@ void cmd_uninit(void);
 
 char* cmd_autocomplete(ProfWin *window, const char *const input);
 void cmd_reset_autocomplete(ProfWin *window);
+void cmd_help_autocomplete_add(const char *const value);
 void cmd_autocomplete_add(const char *const value);
 void cmd_autocomplete_remove(const char *const value);
 void cmd_autocomplete_add_form_fields(DataForm *form);
diff --git a/src/plugins/callbacks.c b/src/plugins/callbacks.c
index 2ae35f35..7951904d 100644
--- a/src/plugins/callbacks.c
+++ b/src/plugins/callbacks.c
@@ -51,6 +51,8 @@ callbacks_add_command(PluginCommand *command)
 {
     p_commands = g_slist_append(p_commands, command);
     cmd_autocomplete_add(command->command_name);
+    cmd_help_autocomplete_add(&command->command_name[1]);
+
 }
 
 void