Allow changing command autocompletions via #optionsfull

This commit is contained in:
Pasi Kallinen
2024-10-19 14:45:21 +03:00
parent 64bb0e2144
commit 945ccff1ff
5 changed files with 114 additions and 2 deletions

View File

@@ -8164,6 +8164,28 @@ optfn_o_bind_keys(
return optn_ok;
}
staticfn int
optfn_o_autocomplete(
int optidx UNUSED, int req, boolean negated UNUSED,
char *opts, char *op UNUSED)
{
if (req == do_init) {
return optn_ok;
}
if (req == do_set) {
}
if (req == get_val || req == get_cnf_val) {
if (!opts)
return optn_err;
Sprintf(opts, n_currently_set, count_autocompletions());
return optn_ok;
}
if (req == do_handler) {
handler_change_autocompletions();
}
return optn_ok;
}
staticfn int
optfn_o_menu_colors(int optidx UNUSED, int req, boolean negated UNUSED,
char *opts, char *op UNUSED)