Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 85216 invoked from network); 4 Aug 2006 02:39:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2006 02:39:38 -0000 Received: (qmail 85708 invoked by uid 500); 4 Aug 2006 02:39:37 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 85668 invoked by uid 500); 4 Aug 2006 02:39:37 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 85657 invoked by uid 99); 4 Aug 2006 02:39:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 19:39:37 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 19:39:36 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C8A061A981C; Thu, 3 Aug 2006 19:39:16 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r428596 - /geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java Date: Fri, 04 Aug 2006 02:39:16 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060804023916.C8A061A981C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jdillon Date: Thu Aug 3 19:39:16 2006 New Revision: 428596 URL: http://svn.apache.org/viewvc?rev=428596&view=rev Log: Fixed minor help bug Comment about what to do... fixed error message Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java?rev=428596&r1=428595&r2=428596&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java Thu Aug 3 19:39:16 2006 @@ -76,11 +76,17 @@ IO io = getIO(); MessageSource messages = getMessageSource(); - if (args.length == 0 || args.length > 1) { + if (args.length == 0) { + // No args, so help + return true; + } + else if (args.length > 1) { + // more than 1 arg complain io.err.println(messages.getMessage("info.unexpected_args", Arguments.asString(args))); return true; } else if (args.length == 1) { + // first arg becomes help topic name topic = args[0]; } @@ -94,6 +100,10 @@ CommandManager manager = getCommandManager(); // + // TODO: Externalize strings + // + + // // TODO: Reuse our command bits... // @@ -129,10 +139,10 @@ } else { // - // TODO: ... + // TODO: When given a command name as a topic, then execute cmd --help // - io.err.println("Pending... sorry"); + io.err.println("Unknown help topic: " + topic); io.err.println(); }