From 312063636718b6480c16af3fb0ef57ad3d8ae907 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 29 Sep 2021 17:25:18 +0200 Subject: 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. --- src/command/cmd_defs.c | 4 ++-- 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 []", "Install a plugin, or all plugins found in a directory (recursive)." }, + { "install []", "Install a plugin, or all plugins found in a directory (recursive). And loads it/them." }, { "uninstall []", "Uninstall a plugin." }, { "update []", "Updates an installed plugin" }, - { "load []", "Load a plugin that already exists in the plugin directory, passing no argument loads all found plugins." }, + { "load []", "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 []", "Unload a loaded plugin, passing no argument will unload all plugins." }, { "reload []", "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); -- cgit 1.4.1-2-gfad0