diff options
author | Viachaslau Khalikin <viachaslau.vinegret@outlook.com> | 2022-09-20 04:00:44 +0300 |
---|---|---|
committer | Viachaslau Khalikin <viachaslau.vinegret@outlook.com> | 2022-09-20 04:00:44 +0300 |
commit | d75e5c1c2859b287410c747c2ab4896f2880d3e6 (patch) | |
tree | af0078b1b2fb290501f0416de52c4830ec41eeae | |
parent | 0ceb8c53c314734c4db4231f47397f228da77081 (diff) | |
download | profani-tty-d75e5c1c2859b287410c747c2ab4896f2880d3e6.tar.gz |
add: autocompletion plugins arguments
support for "update" and "uninstall" Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
-rw-r--r-- | src/command/cmd_ac.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index e3661cac..9dc855de 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -961,6 +961,8 @@ cmd_ac_init(void) plugins_ac = autocomplete_new(); autocomplete_add(plugins_ac, "install"); + autocomplete_add(plugins_ac, "update"); + autocomplete_add(plugins_ac, "uninstall"); autocomplete_add(plugins_ac, "load"); autocomplete_add(plugins_ac, "unload"); autocomplete_add(plugins_ac, "reload"); @@ -2754,6 +2756,10 @@ _plugins_autocomplete(ProfWin* window, const char* const input, gboolean previou return cmd_ac_complete_filepath(input, "/plugins install", previous); } + if (strncmp(input, "/plugins update ", 16) == 0) { + return cmd_ac_complete_filepath(input, "/plugins update", previous); + } + if (strncmp(input, "/plugins load ", 14) == 0) { if (plugins_load_ac == NULL) { plugins_load_ac = autocomplete_new(); |