Added autocomplete for /alias remove

This commit is contained in:
James Booth
2014-01-25 01:00:51 +00:00
parent cb590dd82c
commit b05e17db3e
3 changed files with 47 additions and 3 deletions

View File

@@ -1839,6 +1839,7 @@ cmd_alias(gchar **args, struct cmd_help_t help)
GString *ac_value = g_string_new("/");
g_string_append(ac_value, alias);
cmd_autocomplete_add(ac_value->str);
cmd_alias_add(alias);
g_string_free(ac_value, TRUE);
cons_show("Command alias added /%s -> %s", alias, value);
} else {
@@ -1860,6 +1861,7 @@ cmd_alias(gchar **args, struct cmd_help_t help)
GString *ac_value = g_string_new("/");
g_string_append(ac_value, alias);
cmd_autocomplete_remove(ac_value->str);
cmd_alias_remove(alias);
g_string_free(ac_value, TRUE);
cons_show("Command alias removed -> /%s", alias);
}