editor: make editor configurable via /executable
`/executable set editor /full/path/to/edit`. Regards https://github.com/profanity-im/profanity/issues/1521
This commit is contained in:
@@ -9276,6 +9276,21 @@ cmd_executable_urlsave(ProfWin* window, const char* const command, gchar** args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_executable_editor(ProfWin* window, const char* const command, gchar** args)
|
||||
{
|
||||
guint num_args = g_strv_length(args);
|
||||
|
||||
if (g_strcmp0(args[1], "set") == 0 && num_args >= 3) {
|
||||
prefs_set_string(PREF_COMPOSE_EDITOR, args[2]);
|
||||
cons_show("`editor` command set to invoke '%s'", args[2]);
|
||||
} else {
|
||||
cons_bad_cmd_usage(command);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_mam(ProfWin* window, const char* const command, gchar** args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user