doc: remove comments in example of function hook_command (plugin API reference)
This commit is contained in:
parent
c40137c48e
commit
c1a9ab6731
@ -7163,27 +7163,19 @@ my_command_cb (const void *pointer, void *data, struct t_gui_buffer *buffer,
|
||||
|
||||
/* this example is inspired by command /filter */
|
||||
struct t_hook *my_command_hook =
|
||||
weechat_hook_command (/* command name */
|
||||
"myfilter",
|
||||
/* description */
|
||||
weechat_hook_command ("myfilter",
|
||||
"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 */
|
||||
&my_command_cb,
|
||||
/* callback_data */
|
||||
NULL, NULL);
|
||||
&my_command_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
For example, if command called is `/command abc def ghi`, then 'argv' and
|
||||
|
@ -7290,27 +7290,19 @@ my_command_cb (const void *pointer, void *data, struct t_gui_buffer *buffer,
|
||||
|
||||
/* cet exemple s'inspire de la commande /filter */
|
||||
struct t_hook *my_command_hook =
|
||||
weechat_hook_command (/* nom de la commande */
|
||||
"monfiltre",
|
||||
/* description */
|
||||
weechat_hook_command ("monfiltre",
|
||||
"description de monfiltre",
|
||||
/* paramètres */
|
||||
"[list] | [enable|disable|toggle [nom]] | "
|
||||
"[add nom extension.tampon tags regex] | "
|
||||
"[del nom|-all]",
|
||||
/* description des paramètres */
|
||||
"description des paramètres...",
|
||||
/* complétion */
|
||||
"list"
|
||||
" || enable %(filters_names)"
|
||||
" || disable %(filters_names)"
|
||||
" || toggle %(filters_names)"
|
||||
" || add %(filters_names) %(buffers_plugins_names)|*"
|
||||
" || del %(filters_names)|-all",
|
||||
/* callback */
|
||||
&my_command_cb,
|
||||
/* callback_data */
|
||||
NULL, NULL);
|
||||
&my_command_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
Par exemple, si la commande appelée est `/command abc def ghi`, alors 'argv' et
|
||||
|
@ -7335,27 +7335,19 @@ my_command_cb (const void *pointer, void *data, struct t_gui_buffer *buffer,
|
||||
|
||||
/* questo esempio si ispira al comando /filter */
|
||||
struct t_hook *my_command_hook =
|
||||
weechat_hook_command (/* nome comando */
|
||||
"myfilter",
|
||||
/* description */
|
||||
weechat_hook_command ("myfilter",
|
||||
"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 */
|
||||
&my_command_cb,
|
||||
/* callback_data */
|
||||
NULL, NULL);
|
||||
&my_command_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
Ad esempio, se il comando chiamato è `/comando abc def ghi`, allora
|
||||
|
@ -7169,27 +7169,19 @@ my_command_cb (const void *pointer, void *data, struct t_gui_buffer *buffer,
|
||||
|
||||
/* this example is inspired by command /filter */
|
||||
struct t_hook *my_command_hook =
|
||||
weechat_hook_command (/* command name */
|
||||
"myfilter",
|
||||
/* description */
|
||||
weechat_hook_command ("myfilter",
|
||||
"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 */
|
||||
&my_command_cb,
|
||||
/* callback_data */
|
||||
NULL, NULL);
|
||||
&my_command_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
例えば、コマンドが `/command abc def ghi`
|
||||
|
Loading…
x
Reference in New Issue
Block a user