Fix typo in plugin API reference for weechat_hook_command

v2.8-utf8proc
Sebastien Helleu 2009-09-13 00:17:49 +02:00
parent 4bd7eaf123
commit f7ef4c9047
2 changed files with 40 additions and 32 deletions

View File

@ -3814,12 +3814,7 @@ Arguments:
* 'completion': completion template for command: list of completions for each
argument, separated by space. Many completions are possible for one
argument, separated by "|". Many templates are possible for same command,
separated by "||". Default completion codes are:
include::autogen/plugin_api/completions.txt[]
** special codes:
*** '%%command': reuse completion template from command 'command'
*** '%-': stop completion
*** '%*': repeat last completion
separated by "||".
* 'callback': function called when command is used, arguments:
** 'void *data': pointer
** 'struct t_gui_buffer *buffer': buffer where command is executed
@ -3829,17 +3824,14 @@ include::autogen/plugin_api/completions.txt[]
argument)
* 'callback_data': pointer given to callback when it is called by WeeChat
For example, if command called is `/command abc def ghi`, then argv and
argv_eol contain following values:
Default completion codes are:
include::autogen/plugin_api/completions.txt[]
* 'argv':
** 'argv[0]' == "abc"
** 'argv[1]' == "def"
** 'argv[2]' == "ghi"
* 'argv_eol':
** 'argv_eol[0]' == "abc def ghi"
** 'argv_eol[1]' == "def ghi"
** 'argv_eol[2]' == "ghi"
Special codes:
* '%%command': reuse completion template from command 'command'
* '%-': stop completion
* '%*': repeat last completion
Return value:
@ -3882,6 +3874,18 @@ struct t_hook *my_command_hook =
NULL);
----------------------------------------
For example, if command called is `/command abc def ghi`, then argv and
argv_eol contain following values:
* 'argv':
** 'argv[0]' == "abc"
** 'argv[1]' == "def"
** 'argv[2]' == "ghi"
* 'argv_eol':
** 'argv_eol[0]' == "abc def ghi"
** 'argv_eol[1]' == "def ghi"
** 'argv_eol[2]' == "ghi"
weechat_hook_command_run
^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -3872,12 +3872,7 @@ Paramètres :
complétions pour chaque paramètre, séparés par des espaces. Plusieurs
complétions sont possibles pour un paramètre, séparées par "|". Plusieurs
modèles de complétions sont possibles pour une même commande, séparés par
"||". Les codes complétions par défaut sont :
include::autogen/plugin_api/completions.txt[]
** codes spéciaux :
*** '%%command' : réutiliser le modèle de complétion de la commande 'command'
*** '%-' : arrêter la complétion
*** '%*' : répéter la dernière complétion
"||".
* 'callback' : fonction appelée lorsque la commande est utilisée, paramètres :
** 'void *data' : pointeur
** 'struct t_gui_buffer *buffer' : tampon où la commande est exécutée
@ -3888,17 +3883,14 @@ include::autogen/plugin_api/completions.txt[]
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
WeeChat
Par exemple, si la commande appelée est `/command abc def ghi`, alors argv et
argv_eol contiendront les valeurs suivantes :
Les codes complétions par défaut sont :
include::autogen/plugin_api/completions.txt[]
* 'argv' :
** 'argv[0]' == "abc"
** 'argv[1]' == "def"
** 'argv[2]' == "ghi"
* 'argv_eol' :
** 'argv_eol[0]' == "abc def ghi"
** 'argv_eol[1]' == "def ghi"
** 'argv_eol[2]' == "ghi"
Codes spéciaux :
* '%%command' : réutiliser le modèle de complétion de la commande 'command'
* '%-' : arrêter la complétion
* '%*' : répéter la dernière complétion
Valeur de retour :
@ -3941,6 +3933,18 @@ struct t_hook *my_command_hook =
NULL);
----------------------------------------
Par exemple, si la commande appelée est `/command abc def ghi`, alors argv et
argv_eol contiendront les valeurs suivantes :
* 'argv' :
** 'argv[0]' == "abc"
** 'argv[1]' == "def"
** 'argv[2]' == "ghi"
* 'argv_eol' :
** 'argv_eol[0]' == "abc def ghi"
** 'argv_eol[1]' == "def ghi"
** 'argv_eol[2]' == "ghi"
weechat_hook_command_run
^^^^^^^^^^^^^^^^^^^^^^^^