diff options
author | Viachaslau Khalikin <viachaslau.vinegret@outlook.com> | 2022-09-18 23:34:45 +0300 |
---|---|---|
committer | Viachaslau Khalikin <viachaslau.vinegret@outlook.com> | 2022-09-19 00:29:24 +0300 |
commit | 45fa60e7e2a2fd0253387478d201218a38dac5a8 (patch) | |
tree | 3423bca31bb15fd959fc0e77bc46007cdfba420b /src/command | |
parent | dd1a9a1e504bb60d1ced98f2da874b9b6cb88a64 (diff) | |
download | profani-tty-45fa60e7e2a2fd0253387478d201218a38dac5a8.tar.gz |
Print unloaded plugins which already installed
Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/cmd_defs.c | 2 | ||||
-rw-r--r-- | src/command/cmd_funcs.c | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index 98a74314..37821221 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2162,7 +2162,7 @@ static struct cmd_t command_defs[] = { "/plugins reload [<plugin>]", "/plugins python_version") 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 ".") + "Manage plugins. Passing no arguments lists installed 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). And loads it/them." }, { "uninstall [<plugin>]", "Uninstall a plugin." }, diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 3e40a4ea..e8a10a8d 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -7258,14 +7258,25 @@ cmd_plugins(ProfWin* window, const char* const command, gchar** args) } } + GSList* unloaded_plugins = plugins_unloaded_list(); + if (unloaded_plugins) { + GSList* curr = unloaded_plugins; + cons_show("The following plugins already installed and can be loaded:"); + while (curr) { + cons_show(" %s", curr->data); + curr = g_slist_next(curr); + } + g_slist_free_full(unloaded_plugins, g_free); + } + GList* plugins = plugins_loaded_list(); if (plugins == NULL) { - cons_show("No plugins installed."); + cons_show("No loaded plugins."); return TRUE; } GList* curr = plugins; - cons_show("Installed plugins:"); + cons_show("Loaded plugins:"); while (curr) { cons_show(" %s", curr->data); curr = g_list_next(curr); |