Remove /python sourcepath

I feel like this mostly is confusing people.
Also don't see much value for it.

To me it looks like a regular workflow is like:
```
/plugin install ~/src/profanity-plugins/my.py
```

The whole thing with sourcepath, install (which also loads without
having that described anywhere), load etc is confusing.
Also each plugin file that is present in
`.local/share/profanity/plugins` will then be auto loaded. Which means
after installation.
This commit is contained in:
Michael Vetter
2021-09-29 14:21:33 +02:00
parent fd9ccec8dc
commit 3b3a6b7a75
5 changed files with 5 additions and 90 deletions

View File

@@ -242,7 +242,6 @@ static Autocomplete console_ac;
static Autocomplete console_msg_ac;
static Autocomplete autoping_ac;
static Autocomplete plugins_ac;
static Autocomplete plugins_sourcepath_ac;
static Autocomplete plugins_load_ac;
static Autocomplete plugins_unload_ac;
static Autocomplete plugins_reload_ac;
@@ -940,11 +939,6 @@ cmd_ac_init(void)
autocomplete_add(plugins_ac, "unload");
autocomplete_add(plugins_ac, "reload");
autocomplete_add(plugins_ac, "python_version");
autocomplete_add(plugins_ac, "sourcepath");
plugins_sourcepath_ac = autocomplete_new();
autocomplete_add(plugins_sourcepath_ac, "set");
autocomplete_add(plugins_sourcepath_ac, "clear");
filepath_ac = autocomplete_new();
@@ -1355,7 +1349,6 @@ cmd_ac_reset(ProfWin* window)
autocomplete_reset(console_msg_ac);
autocomplete_reset(autoping_ac);
autocomplete_reset(plugins_ac);
autocomplete_reset(plugins_sourcepath_ac);
autocomplete_reset(blocked_ac);
autocomplete_reset(tray_ac);
autocomplete_reset(presence_ac);
@@ -2638,21 +2631,10 @@ _plugins_autocomplete(ProfWin* window, const char* const input, gboolean previou
{
char* result = NULL;
if (strncmp(input, "/plugins sourcepath set ", 24) == 0) {
return cmd_ac_complete_filepath(input, "/plugins sourcepath set", previous);
}
if (strncmp(input, "/plugins install ", 17) == 0) {
return cmd_ac_complete_filepath(input, "/plugins install", previous);
}
if (strncmp(input, "/plugins sourcepath ", 20) == 0) {
result = autocomplete_param_with_ac(input, "/plugins sourcepath", plugins_sourcepath_ac, TRUE, previous);
if (result) {
return result;
}
}
if (strncmp(input, "/plugins load ", 14) == 0) {
if (plugins_load_ac == NULL) {
plugins_load_ac = autocomplete_new();