diff --git a/configure.ac b/configure.ac index b3cbb793..a77a04de 100644 --- a/configure.ac +++ b/configure.ac @@ -90,7 +90,8 @@ fi # Default parameters AM_CFLAGS="-Wall -I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -L/usr/lib/python2.7/config -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions" if test "x$PACKAGE_STATUS" = xdevelopment; then - AM_CFLAGS="$AM_CFLAGS -Wunused -Werror" +# AM_CFLAGS="$AM_CFLAGS -Wunused -Werror" + AM_CFLAGS="$AM_CFLAGS -Wunused" fi LIBS="$LIBS $DEPS_LIBS $NOTIFY_LIBS -lpthread -ldl -lutil -lm -lpython2.7" diff --git a/src/command/command.c b/src/command/command.c index c59c6a78..ab1d28ce 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -980,6 +980,12 @@ cmd_init(void) cmd_history_init(); } +void +cmd_autocomplete_add(const char * const command) +{ + autocomplete_add(commands_ac, strdup(command)); +} + void cmd_close(void) { diff --git a/src/command/command.h b/src/command/command.h index c20413c8..db9b183a 100644 --- a/src/command/command.h +++ b/src/command/command.h @@ -49,4 +49,6 @@ void cmd_history_append(char *inp); char *cmd_history_previous(char *inp, int *size); char *cmd_history_next(char *inp, int *size); +void cmd_autocomplete_add(const char * const command); + #endif diff --git a/src/plugins/command.c b/src/plugins/command.c index 1f49bc51..a93d06f3 100644 --- a/src/plugins/command.c +++ b/src/plugins/command.c @@ -20,7 +20,11 @@ * */ +#include "command/command.h" #include "plugins/command.h" +#include "tools/autocomplete.h" + +#include "ui/ui.h" // API functions @@ -30,6 +34,7 @@ void add_command(PluginCommand *command) { p_commands = g_slist_append(p_commands, command); + cmd_autocomplete_add(command->command_name); } gboolean diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index 5a88a5bd..fa1216f5 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -23,6 +23,7 @@ #include #include "plugins/api.h" +#include "plugins/command.h" #include "plugins/plugins.h" #include "ui/ui.h"