diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 19a21a1eb..f821eb81b 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -155,7 +155,7 @@ Under WeeChat: [[plugin_example]] === Plugin example -Full example of plugin, which adds a command _/double_: displays two times +Full example of plugin, which adds a command `/double`: displays two times arguments on current buffer, or execute two times a command (OK that's not very useful, but that's just an example!): @@ -7240,7 +7240,7 @@ recommended to choose a name with a unique prefix, like "plugin_xxx" (where The callback must only call function <<_hook_completion_list_add,hook_completion_list_add>> and must *NOT* update the command line. + To update the command line when kbd:[Tab] is pressed, you can use the function -<<_hook_command_run,hook_command_run>> with command: "/input complete_next" +<<_hook_command_run,hook_command_run>> with command: `/input complete_next` (and you must return _WEECHAT_RC_OK_EAT_ if your callback has updated the command line, so that WeeChat will not perform the completion). diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index fdbfa576a..dd4414ab5 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -160,7 +160,7 @@ Sous WeeChat : [[plugin_example]] === Exemple d'extension -Exemple complet d'extension, qui ajoute une commande _/double_ : affiche deux +Exemple complet d'extension, qui ajoute une commande `/double` : affiche deux fois les paramètres sur le tampon courant, ou exécute deux fois une commande (ok ce n'est pas très utile, mais c'est juste un exemple !) : @@ -7368,7 +7368,7 @@ Le "callback" doit seulement appeler la fonction et ne doit *PAS* mettre à jour la ligne de commande. + Pour mettre à jour la ligne de commande quand kbd:[Tab] est pressé, vous pouvez utiliser la fonction <<_hook_command_run,hook_command_run>> -avec la commande : "/input complete_next" (et vous devez retourner +avec la commande : `/input complete_next` (et vous devez retourner _WEECHAT_RC_OK_EAT_ si votre "callback" a mis à jour la ligne de commande, de sorte que WeeChat n'exécute pas la complétion). diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 5264657d2..681854471 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -171,7 +171,7 @@ In WeeChat: [[plugin_example]] === Plugin di esempio -Un esempio completo di plugin, che aggiunge un comando _/double_: +Un esempio completo di plugin, che aggiunge un comando `/double`: visualizza due volte gli argomenti nel buffer corrente, oppure esegue un comando due volte (ok, non sarà molto utile, ma è solo un esempio!): @@ -7434,7 +7434,7 @@ The callback must only call function and must *NOT* update the command line. + To update the command line when kbd:[Tab] is pressed, you can use the function <<_hook_command_run,hook_command_run>> with command: -"/input complete_next" (and you must return _WEECHAT_RC_OK_EAT_ if your callback +`/input complete_next` (and you must return _WEECHAT_RC_OK_EAT_ if your callback has updated the command line, so that WeeChat will not perform the completion). Valore restituito: diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 3dfb5fefe..da5d5b79a 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -161,7 +161,7 @@ WeeChat の中で: [[plugin_example]] === プラグインの例 -コマンド _/double_ を追加するプラグインの例: 引数を 2 +コマンド `/double` を追加するプラグインの例: 引数を 2 倍して現在のバッファに表示するか、コマンドを 2 回実行する (これは実用的なコマンドというよりも、ただの例です!): @@ -7247,7 +7247,7 @@ struct t_hook *weechat_hook_completion (const char *completion_item, 関数を呼び出すだけで、コマンドラインをコールバックで絶対に *変更しない* でください。 + kbd:[Tab] が押された時にコマンドラインを更新するためには、関数 <<_hook_command_run,hook_command_run>> を使ってコマンド -"/input complete_next" をフックしてください (コールバックがコマンドラインを更新する場合は必ず +`/input complete_next` をフックしてください (コールバックがコマンドラインを更新する場合は必ず _WEECHAT_RC_OK_EAT_ を返してください。そうすれば WeeChat は補完を行いません)。 戻り値: