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/en/weechat_plugin_api.en.adoc | |
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/en/weechat_plugin_api.en.adoc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 29 |
1 files changed, 27 insertions, 2 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 |