diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-09-29 17:25:18 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-09-29 17:32:54 +0200 |
commit | 312063636718b6480c16af3fb0ef57ad3d8ae907 (patch) | |
tree | 30b8614a5e9f225b996c4acd85e8e1da6f39583e | |
parent | b0e0012c22f5ffac4da91cef05743916e9b43ac7 (diff) | |
download | profani-tty-312063636718b6480c16af3fb0ef57ad3d8ae907.tar.gz |
Add more help about how to use plugins
`/plugins install` installs a plugin to `.local/share/profanity/plugins`. And also loads it. When a plugin is loaded it will automatically be added to the `profrc` file like this: ``` [plugins] load=my.py; ``` On the next start Profanity will try to load this plugin again unless `/plugin unload my.py` is called.
-rw-r--r-- | src/command/cmd_defs.c | 4 | ||||
-rw-r--r-- | src/command/cmd_funcs.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index 37a2db89..1b8c3112 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2157,10 +2157,10 @@ static struct cmd_t command_defs[] = { CMD_DESC( "Manage plugins. Passing no arguments lists currently loaded plugins and global plugins which are available for local installation. Global directory for Python plugins is " GLOBAL_PYTHON_PLUGINS_PATH " and for C Plugins is " GLOBAL_C_PLUGINS_PATH ".") CMD_ARGS( - { "install [<path>]", "Install a plugin, or all plugins found in a directory (recursive)." }, + { "install [<path>]", "Install a plugin, or all plugins found in a directory (recursive). And loads it/them." }, { "uninstall [<plugin>]", "Uninstall a plugin." }, { "update [<path>]", "Updates an installed plugin" }, - { "load [<plugin>]", "Load a plugin that already exists in the plugin directory, passing no argument loads all found plugins." }, + { "load [<plugin>]", "Load a plugin that already exists in the plugin directory, passing no argument loads all found plugins. It will be loaded upon next start too unless unloaded." }, { "unload [<plugin>]", "Unload a loaded plugin, passing no argument will unload all plugins." }, { "reload [<plugin>]", "Reload a plugin, passing no argument will reload all plugins." }, { "python_version", "Show the Python interpreter version." }) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 8325ab44..2a206d5b 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6965,7 +6965,7 @@ cmd_plugins_install(ProfWin* window, const char* const command, gchar** args) gchar* plugin_name = g_path_get_basename(path); gboolean result = plugins_install(plugin_name, path, error_message); if (result) { - cons_show("Plugin installed: %s", plugin_name); + cons_show("Plugin installed and loaded: %s", plugin_name); } else { cons_show("Failed to install plugin: %s. %s", plugin_name, error_message->str); } @@ -6978,7 +6978,7 @@ cmd_plugins_install(ProfWin* window, const char* const command, gchar** args) if (result->installed || result->failed) { if (result->installed) { cons_show(""); - cons_show("Installed plugins:"); + cons_show("Installed and loaded plugins:"); GSList* curr = result->installed; while (curr) { cons_show(" %s", curr->data); |