diff options
author | Will Song <incertia9474@gmail.com> | 2014-11-27 12:07:18 -0600 |
---|---|---|
committer | Will Song <incertia9474@gmail.com> | 2014-11-27 12:07:18 -0600 |
commit | 48778265e73d6dc45c9b85a574144ab9bc2ce07d (patch) | |
tree | 28cce45794ca099dba1def60b52f37c94bcb54b6 /src/command | |
parent | de9e621bb776b91aecfca02973fbfcbe16b38162 (diff) | |
download | profani-tty-48778265e73d6dc45c9b85a574144ab9bc2ce07d.tar.gz |
add a bit of default account autocomplete
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/command.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/command/command.c b/src/command/command.c index 6c52af2a..095943ec 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1054,6 +1054,7 @@ static Autocomplete theme_load_ac; static Autocomplete account_ac; static Autocomplete account_set_ac; static Autocomplete account_clear_ac; +static Autocomplete account_default_ac; static Autocomplete disco_ac; static Autocomplete close_ac; static Autocomplete wins_ac; @@ -1216,6 +1217,7 @@ cmd_init(void) autocomplete_add(account_ac, "remove"); autocomplete_add(account_ac, "enable"); autocomplete_add(account_ac, "disable"); + autocomplete_add(account_ac, "default"); autocomplete_add(account_ac, "rename"); autocomplete_add(account_ac, "set"); autocomplete_add(account_ac, "clear"); @@ -1242,6 +1244,10 @@ cmd_init(void) autocomplete_add(account_clear_ac, "port"); autocomplete_add(account_clear_ac, "otr"); + account_default_ac = autocomplete_new(); + autocomplete_add(account_default_ac, "set"); + autocomplete_add(account_default_ac, "off"); + close_ac = autocomplete_new(); autocomplete_add(close_ac, "read"); autocomplete_add(close_ac, "all"); @@ -1442,6 +1448,7 @@ cmd_uninit(void) autocomplete_free(account_ac); autocomplete_free(account_set_ac); autocomplete_free(account_clear_ac); + autocomplete_free(account_default_ac); autocomplete_free(disco_ac); autocomplete_free(close_ac); autocomplete_free(wins_ac); @@ -1613,6 +1620,7 @@ cmd_reset_autocomplete() autocomplete_reset(account_ac); autocomplete_reset(account_set_ac); autocomplete_reset(account_clear_ac); + autocomplete_reset(account_default_ac); autocomplete_reset(disco_ac); autocomplete_reset(close_ac); autocomplete_reset(wins_ac); @@ -2784,7 +2792,8 @@ _account_autocomplete(char *input, int *size) int i = 0; gchar *account_choice[] = { "/account set", "/account show", "/account enable", - "/account disable", "/account rename", "/account clear", "/account remove" }; + "/account disable", "/account rename", "/account clear", "/account remove", + "/account default set" }; for (i = 0; i < ARRAY_SIZE(account_choice); i++) { found = autocomplete_param_with_func(input, size, account_choice[i], |