1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

fix: filtering of the available global plugins

For command /plugins :
Don't print files that do not correspond to the plugins design

Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
This commit is contained in:
Viachaslau Khalikin 2022-09-20 01:46:51 +03:00
parent cc7231a43b
commit 0ceb8c53c3
No known key found for this signature in database
GPG Key ID: 7569457AA0318285

View File

@ -7247,14 +7247,16 @@ cmd_plugins(ProfWin* window, const char* const command, gchar** args)
const gchar* filename;
cons_show("The following Python plugins are available globally and can be installed:");
while ((filename = g_dir_read_name(global_pyp_dir))) {
cons_show(" %s", filename);
if (g_str_has_suffix(filename, ".py"))
cons_show(" %s", filename);
}
}
if (global_cp_dir) {
const gchar* filename;
cons_show("The following C plugins are available globally and can be installed:");
while ((filename = g_dir_read_name(global_cp_dir))) {
cons_show(" %s", filename);
if (g_str_has_suffix(filename, ".so"))
cons_show(" %s", filename);
}
}