summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/de/dev/plugin_c_api.de.xml33
-rw-r--r--doc/en/dev/plugin_c_api.en.xml33
-rw-r--r--doc/fr/dev/plugin_c_api.fr.xml33
3 files changed, 81 insertions, 18 deletions
diff --git a/doc/de/dev/plugin_c_api.de.xml b/doc/de/dev/plugin_c_api.de.xml
index f35947871..99bf68902 100644
--- a/doc/de/dev/plugin_c_api.de.xml
+++ b/doc/de/dev/plugin_c_api.de.xml
@@ -5035,6 +5035,7 @@ struct t_hook *weechat_hook_command (
<option>completion</option>: completion template for command:
list of completions for each arguments, separated by space. Many
completions are possible for one argument, separated by "|".
+ Many templates are possible for same command, separeted by "||".
Default completion codes are:
<informaltable colsep="0" frame="none">
<tgroup cols="3">
@@ -5061,6 +5062,10 @@ struct t_hook *weechat_hook_command (
</thead>
<tbody>
<row>
+ <entry>%%command</entry>
+ <entry>Reuse completion template from /command</entry>
+ </row>
+ <row>
<entry>%-</entry>
<entry>Stop completion</entry>
</row>
@@ -5152,13 +5157,29 @@ my_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
return WEECHAT_RC_OK;
}
+/* this is an example, inspired by weechat command /filter */
struct t_hook *my_command_hook =
- weechat_hook_command ("mycommand",
- "description of my command",
- "[command [buffer]]",
- "command: WeeChat or plugin command\n"
- " buffer: buffer name",
- "%w|%p %b", &amp;my_command_cb, NULL);
+ weechat_hook_command (/* command name */
+ "myfilter",
+ /* description */
+ "description of myfilter",
+ /* args */
+ "[list] | [enable|disable|toggle [name]] | "
+ "[add name plugin.buffer tags regex] | "
+ "[del name|-all]",
+ /* args description */
+ "description of arguments...",
+ /* completion */
+ "list"
+ " || enable %(filters_names)"
+ " || disable %(filters_names)"
+ " || toggle %(filters_names)"
+ " || add %(filters_names) %(buffers_plugins_names)|*"
+ " || del %(filters_names)|-all",
+ /* callback */
+ &amp;my_command_cb,
+ /* callback_data */
+ NULL);
</screen>
</para>
</section>
diff --git a/doc/en/dev/plugin_c_api.en.xml b/doc/en/dev/plugin_c_api.en.xml
index 211163bdf..538828c09 100644
--- a/doc/en/dev/plugin_c_api.en.xml
+++ b/doc/en/dev/plugin_c_api.en.xml
@@ -5034,6 +5034,7 @@ struct t_hook *weechat_hook_command (
<option>completion</option>: completion template for command:
list of completions for each arguments, separated by space. Many
completions are possible for one argument, separated by "|".
+ Many templates are possible for same command, separeted by "||".
Default completion codes are:
<informaltable colsep="0" frame="none">
<tgroup cols="3">
@@ -5060,6 +5061,10 @@ struct t_hook *weechat_hook_command (
</thead>
<tbody>
<row>
+ <entry>%%command</entry>
+ <entry>Reuse completion template from /command</entry>
+ </row>
+ <row>
<entry>%-</entry>
<entry>Stop completion</entry>
</row>
@@ -5151,13 +5156,29 @@ my_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
return WEECHAT_RC_OK;
}
+/* this is an example, inspired by weechat command /filter */
struct t_hook *my_command_hook =
- weechat_hook_command ("mycommand",
- "description of my command",
- "[command [buffer]]",
- "command: WeeChat or plugin command\n"
- " buffer: buffer name",
- "%w|%p %b", &amp;my_command_cb, NULL);
+ weechat_hook_command (/* command name */
+ "myfilter",
+ /* description */
+ "description of myfilter",
+ /* args */
+ "[list] | [enable|disable|toggle [name]] | "
+ "[add name plugin.buffer tags regex] | "
+ "[del name|-all]",
+ /* args description */
+ "description of arguments...",
+ /* completion */
+ "list"
+ " || enable %(filters_names)"
+ " || disable %(filters_names)"
+ " || toggle %(filters_names)"
+ " || add %(filters_names) %(buffers_plugins_names)|*"
+ " || del %(filters_names)|-all",
+ /* callback */
+ &amp;my_command_cb,
+ /* callback_data */
+ NULL);
</screen>
</para>
</section>
diff --git a/doc/fr/dev/plugin_c_api.fr.xml b/doc/fr/dev/plugin_c_api.fr.xml
index 0c00862ff..dc43378f1 100644
--- a/doc/fr/dev/plugin_c_api.fr.xml
+++ b/doc/fr/dev/plugin_c_api.fr.xml
@@ -5035,6 +5035,7 @@ struct t_hook *weechat_hook_command (
<option>completion</option>: completion template for command:
list of completions for each arguments, separated by space. Many
completions are possible for one argument, separated by "|".
+ Many templates are possible for same command, separeted by "||".
Default completion codes are:
<informaltable colsep="0" frame="none">
<tgroup cols="3">
@@ -5061,6 +5062,10 @@ struct t_hook *weechat_hook_command (
</thead>
<tbody>
<row>
+ <entry>%%command</entry>
+ <entry>Reuse completion template from /command</entry>
+ </row>
+ <row>
<entry>%-</entry>
<entry>Stop completion</entry>
</row>
@@ -5152,13 +5157,29 @@ my_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
return WEECHAT_RC_OK;
}
+/* this is an example, inspired by weechat command /filter */
struct t_hook *my_command_hook =
- weechat_hook_command ("mycommand",
- "description of my command",
- "[command [buffer]]",
- "command: WeeChat or plugin command\n"
- " buffer: buffer name",
- "%w|%p %b", &amp;my_command_cb, NULL);
+ weechat_hook_command (/* command name */
+ "myfilter",
+ /* description */
+ "description of myfilter",
+ /* args */
+ "[list] | [enable|disable|toggle [name]] | "
+ "[add name plugin.buffer tags regex] | "
+ "[del name|-all]",
+ /* args description */
+ "description of arguments...",
+ /* completion */
+ "list"
+ " || enable %(filters_names)"
+ " || disable %(filters_names)"
+ " || toggle %(filters_names)"
+ " || add %(filters_names) %(buffers_plugins_names)|*"
+ " || del %(filters_names)|-all",
+ /* callback */
+ &amp;my_command_cb,
+ /* callback_data */
+ NULL);
</screen>
</para>
</section>