about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorViachaslau Khalikin <viachaslau.vinegret@outlook.com>2022-09-20 04:00:44 +0300
committerViachaslau Khalikin <viachaslau.vinegret@outlook.com>2022-09-20 04:00:44 +0300
commitd75e5c1c2859b287410c747c2ab4896f2880d3e6 (patch)
treeaf0078b1b2fb290501f0416de52c4830ec41eeae /src
parent0ceb8c53c314734c4db4231f47397f228da77081 (diff)
downloadprofani-tty-d75e5c1c2859b287410c747c2ab4896f2880d3e6.tar.gz
add: autocompletion plugins arguments
support for "update" and "uninstall"

Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_ac.c6
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();