diff options
-rw-r--r-- | doc/en/dev/plugin_c_api.en.xml | 4 | ||||
-rw-r--r-- | src/core/wee-command.c | 2 | ||||
-rw-r--r-- | src/gui/gui-completion.c | 25 |
3 files changed, 30 insertions, 1 deletions
diff --git a/doc/en/dev/plugin_c_api.en.xml b/doc/en/dev/plugin_c_api.en.xml index 22a19278a..a3be40b32 100644 --- a/doc/en/dev/plugin_c_api.en.xml +++ b/doc/en/dev/plugin_c_api.en.xml @@ -5051,6 +5051,10 @@ struct t_hook *weechat_hook_command ( <entry>Buffers names</entry> </row> <row> + <entry>%B</entry> + <entry>Buffers names (with plugin name)</entry> + </row> + <row> <entry>%c</entry> <entry>Configuration files</entry> </row> diff --git a/src/core/wee-command.c b/src/core/wee-command.c index cc3df293c..e2aae65b0 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -3683,7 +3683,7 @@ command_init () " filter lines containing \"weechat sucks\" on IRC " "channel #weechat:\n" " /filter add sucks irc.freenode.#weechat * weechat sucks"), - "list|enable|disable|toggle|add|rename|del %F", + "list|enable|disable|toggle|add|rename|del %F %B", &command_filter, NULL); hook_command (NULL, "help", N_("display help about commands and options"), diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 40f11f7ab..16ef58b8c 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -355,6 +355,28 @@ gui_completion_list_add_buffers_names (struct t_gui_completion *completion) } /* + * gui_completion_list_add_plugins_buffers_names: add plugins + buffers names + * to completion list + */ + +void +gui_completion_list_add_plugins_buffers_names (struct t_gui_completion *completion) +{ + struct t_gui_buffer *ptr_buffer; + char name[512]; + + for (ptr_buffer = gui_buffers; ptr_buffer; + ptr_buffer = ptr_buffer->next_buffer) + { + snprintf (name, sizeof (name), "%s.%s", + plugin_get_name (ptr_buffer->plugin), + ptr_buffer->name); + gui_completion_list_add (completion, name, + 0, WEECHAT_LIST_POS_SORT); + } +} + +/* * gui_completion_list_add_config_files: add config files to completion list */ @@ -1016,6 +1038,9 @@ gui_completion_build_list_template (struct t_gui_completion *completion, case 'b': /* buffers names */ gui_completion_list_add_buffers_names (completion); break; + case 'B': /* plugin + "." + buffer name */ + gui_completion_list_add_plugins_buffers_names (completion); + break; case 'c': /* config files */ gui_completion_list_add_config_files (completion); break; |