clix.roster: Add a help command to list available sub-commands.

Sun, 14 Aug 2011 21:27:41 +0200

author
Kim Alvefur <zash@zash.se>
date
Sun, 14 Aug 2011 21:27:41 +0200
changeset 63
bbbef9f4a798
parent 62
f455dad33efd
child 64
582afbb2b23d

clix.roster: Add a help command to list available sub-commands.

clix/roster.lua file | annotate | diff | comparison | revisions
--- a/clix/roster.lua	Mon Jul 04 10:43:43 2011 +0200
+++ b/clix/roster.lua	Sun Aug 14 21:27:41 2011 +0200
@@ -92,6 +92,13 @@
 				end
 			end;
 		}
+		function commands.help ()
+			print("Roster commands");
+			for cmd in pairs(commands) do
+				print(" * " .. cmd);
+			end
+			print("Most commands takes a JID as argument.");
+		end
 		local function on_incoming(stdin, text)
 			local cmd = text:match("^(%a*)");
 			local param = text:match("%s+(.*)", #cmd);

mercurial