about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorPhilip Flohr <philip.flohr@student.kit.edu>2018-05-07 20:29:34 +0200
committerDmitry Podgorny <pasis.ua@gmail.com>2018-09-06 19:28:02 +0300
commitcd86f5bc288872ae8050c6f56515d4b8a5c77475 (patch)
tree7bfbea8d5cb4ca3037acb5e9a42a3c5367db627c /src/command/cmd_funcs.c
parente4ddced4203235c8393369ba3f0a62de1f5e980e (diff)
downloadprofani-tty-cd86f5bc288872ae8050c6f56515d4b8a5c77475.tar.gz
added the possibility to uninstall a plugin
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index a955e2f8..6aae8fb2 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -6664,6 +6664,23 @@ cmd_plugins_install(ProfWin *window, const char *const command, gchar **args)
 }
 
 gboolean
+cmd_plugins_uninstall(ProfWin *window, const char *const command, gchar **args)
+{
+    if (args[1] == NULL) {
+        return FALSE;
+    }
+
+    gboolean res = plugins_uninstall(args[1]);
+    if (res) {
+        cons_show("Uninstalled plugin: %s", args[1]);
+    } else {
+        cons_show("Failed to uninstall plugin: %s", args[1]);
+    }
+
+    return TRUE;
+}
+
+gboolean
 cmd_plugins_load(ProfWin *window, const char *const command, gchar **args)
 {
     if (args[1] == NULL) {