geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
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 GMT
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();
         }
 



Mime
View raw message