# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1313350061 -7200
# Node ID bbbef9f4a798554690824e5c0c8a0ba37ff0fde2
# Parent  f455dad33efd2a280a2667d7e71983d5e6c13be6
clix.roster: Add a help command to list available sub-commands.

diff -r f455dad33efd -r bbbef9f4a798 clix/roster.lua
--- 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);