diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-26 21:20:01 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-26 21:20:01 +0200 |
commit | b1ab2a0c50b328d0f5047e2a43efd96d7cd3ac12 (patch) | |
tree | fc04af1b886e143a6d09d052e0a514a0876b83ad /doc | |
parent | 33ee8036099114e5c13ff44ba89a915f13922e59 (diff) | |
download | weechat-b1ab2a0c50b328d0f5047e2a43efd96d7cd3ac12.zip |
doc: add description of arguments sent to the weechat_plugin_init plugin function (plugin API reference)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 29 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 31 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 32 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 31 |
4 files changed, 113 insertions, 10 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index a124aeb45..8c59c1359 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -94,14 +94,39 @@ Arguments: * _plugin_: pointer to WeeChat plugin structure, used to initialize the convenience global pointer `weechat_plugin` -* _argc_: number of arguments for plugin (given on command line by user) -* _argv_: arguments for plugin +* _argc_: number of arguments for plugin +* _argv_: arguments for plugin (see below) Return value: * _WEECHAT_RC_OK_ if successful (plugin will be loaded) * _WEECHAT_RC_ERROR_ if error (plugin will NOT be loaded) +[[plugin_arguments]] +===== Plugin arguments + +When the plugin is loaded by WeeChat, it receives the list of arguments +in parameter `argv` and the number of arguments in `argc`. + +The arguments can be: + +* command line arguments when running the WeeChat binary, +* arguments given to the command `/plugin load xxx`, when the plugin is manually + loaded by the user. + +When the arguments come from the command line, only these arguments are sent to +the plugin: + +*-a*, *--no-connect*:: + Disable auto-connect to servers when WeeChat is starting. + +*-s*, *--no-script*:: + Disable scripts auto-load. + +*plugin:option*:: + Option for a plugin: only the plugin-related options are sent, for example + only the options starting with `irc:` are sent to the plugin called "irc". + [[plugin_priority]] ===== Plugin priority diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index ac3ad25dc..27fbaff06 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -97,15 +97,40 @@ Paramètres : * _plugin_ : pointeur vers la structure d'extension WeeChat, utilisé pour initialiser le pointeur global `weechat_plugin` -* _argc_ : nombre de paramètres pour l'extension (donnés sur la ligne de - commande par l'utilisateur) -* _argv_ : paramètres pour l'extension +* _argc_ : nombre de paramètres pour l'extension +* _argv_ : paramètres pour l'extension (voir ci-dessous) Valeur de retour : * _WEECHAT_RC_OK_ si ok (l'extension sera chargée) * _WEECHAT_RC_ERROR_ si erreur (l'extension ne sera PAS chargée) +[[plugin_arguments]] +===== Paramètres de l'extension + +Lorsque l'extension est chargée par WeeChat, elle reçoit la liste des +paramètres dans `argv` et le nombre de paramètres dans `argc`. + +Les paramètres peuvent être : + +* les paramètres de ligne de commande lors du lancement du binaire WeeChat, +* les paramètres donnés à la commande `/plugin load xxx`, lorsque l'extension + est chargée manuellement par l'utilisateur. + +Lorsque les paramètres proviennent de la ligne de commande, seulement ces +paramètres sont envoyés à l'extension : + +*-a*, *--no-connect*:: + Supprimer la connexion automatique aux serveurs lors du démarrage. + +*-s*, *--no-script*:: + Supprimer le chargement automatique des scripts au démarrage. + +*extension:option*:: + Option pour une extension : seulement les options liées à l'extension sont + envoyées, par exemple seulement les options démarrant par `irc:` sont + envoyées à l'extension "irc". + [[plugin_priority]] ===== Priorité de l'extension diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 27b40981e..78417a469 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -106,9 +106,9 @@ Argomenti: // TRANSLATION MISSING * _plugin_: puntatore alla struttura del plugin di WeeChat, used to initialize the convenience global pointer `weechat_plugin` -* _argc_: numero di argomenti per il plugin (fornito dalla riga di comando - dall'utente) -* _argv_: argomenti per il plugin +* _argc_: numero di argomenti per il plugin +// TRANSLATION MISSING +* _argv_: argomenti per il plugin (see below) Valori restituiti: @@ -118,6 +118,32 @@ Valori restituiti: verrà caricato) // TRANSLATION MISSING +[[plugin_arguments]] +===== Plugin arguments + +When the plugin is loaded by WeeChat, it receives the list of arguments +in parameter `argv` and the number of arguments in `argc`. + +The arguments can be: + +* command line arguments when running the WeeChat binary, +* arguments given to the command `/plugin load xxx`, when the plugin is manually + loaded by the user. + +When the arguments come from the command line, only these arguments are sent to +the plugin: + +*-a*, *--no-connect*:: + Disabilita la connessione automatica ai server all'avvio di WeeChat. + +*-s*, *--no-script*:: + Disabilita il caricamento automatico dei script. + +*plugin:option*:: + Option for a plugin: only the plugin-related options are sent, for example + only the options starting with `irc:` are sent to the plugin called "irc". + +// TRANSLATION MISSING [[plugin_priority]] ===== Plugin priority diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index b9da4e855..fad46760f 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -100,14 +100,41 @@ int weechat_plugin_init (struct t_weechat_plugin *plugin, * _plugin_: WeeChat プラグイン構造体へのポインタ。これはグローバルポインタ `weechat_plugin` を初期化する際に使われます -* _argc_: プラグインに対する引数の数 (ユーザがコマンドラインで指定) -* _argv_: プラグインに対する引数 +* _argc_: プラグインに対する引数の数 +// TRANSLATION MISSING +* _argv_: プラグインに対する引数 (see below) 戻り値: * _WEECHAT_RC_OK_ 成功した場合 (プラグインをロードします) * _WEECHAT_RC_ERROR_ エラーが起きた場合 (プラグインをロードしません) +// TRANSLATION MISSING +[[plugin_arguments]] +===== Plugin arguments + +When the plugin is loaded by WeeChat, it receives the list of arguments +in parameter `argv` and the number of arguments in `argc`. + +The arguments can be: + +* command line arguments when running the WeeChat binary, +* arguments given to the command `/plugin load xxx`, when the plugin is manually + loaded by the user. + +When the arguments come from the command line, only these arguments are sent to +the plugin: + +*-a*, *--no-connect*:: + WeeChat の起動時にサーバへの自動接続を行わない + +*-s*, *--no-script*:: + スクリプトの自動ロードを止める + +*plugin:option*:: + Option for a plugin: only the plugin-related options are sent, for example + only the options starting with `irc:` are sent to the plugin called "irc". + [[plugin_priority]] ===== プラグインの優先度 |