@@ -0,0 +1,966 @@
+package forager.ui;%0A%0Aimport java.io.IOException;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport forager.client.Forager;%0A%0Aimport galileo.net.NetworkDestination;%0A%0Aimport joptsimple.OptionParser;%0Aimport joptsimple.OptionSet;%0Aimport joptsimple.OptionSpec;%0A%0Apublic class HelpCommand implements Command %7B%0A%0A    Map%3CString, Command%3E commands;%0A%0A    public HelpCommand(Map%3CString, Command%3E commands) %7B%0A        this.commands = commands;%0A    %7D%0A%0A    public void execute(String%5B%5D args) throws Exception %7B%0A        if (args.length %3C= 0) %7B%0A            printUsage();%0A            return;%0A        %7D%0A%0A        Command cmd = commands.get(args%5B0%5D);%0A        if (cmd == null) %7B%0A            printUsage();%0A            return;%0A        %7D%0A%0A        cmd.printUsage();%0A    %7D%0A%0A    public String name() %7B%0A        return %22help%22;%0A    %7D%0A%0A    public void printUsage()%0A    throws IOException %7B%0A        System.out.println(%22Usage: forager %22 + name() + %22 command_name%22);%0A    %7D%0A%7D%0A

Add a help command