Changeset

137:7130d5ec115c

clix.raw: Allow specifying extra plugins to load
author Kim Alvefur <zash@zash.se>
date Sat, 14 Nov 2020 15:39:57 +0100
parents 136:2309402dd3cb
children 138:1783d4226ba1
files clix/raw.lua
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/clix/raw.lua	Sat Nov 14 15:39:16 2020 +0100
+++ b/clix/raw.lua	Sat Nov 14 15:39:57 2020 +0100
@@ -116,5 +116,11 @@
 		end
 
 	end
-	return clix_connect(opts, on_connect);
+	local plugins = {};
+	for i=#args,1,-1 do
+		if args[i]:sub(1,1) == "+" then
+			table.insert(plugins, table.remove(args, i):sub(2))
+		end
+	end
+	return clix_connect(opts, on_connect, plugins);
 end