geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r604212 - /geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
Date Fri, 14 Dec 2007 15:34:39 GMT
Author: jdillon
Date: Fri Dec 14 07:33:41 2007
New Revision: 604212

URL: http://svn.apache.org/viewvc?rev=604212&view=rev
Log:
(GSHELL-86) Strip of leading "/" from command paths for now... :-(

Modified:
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java?rev=604212&r1=604211&r2=604212&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
Fri Dec 14 07:33:41 2007
@@ -138,8 +138,19 @@
             if (child instanceof GroupNode) {
                 GroupNode node = (GroupNode) child;
 
+                String path = node.getPath();
+                
+                //
+                // HACK: Until we get / and ../ stuff working, we have to strip off the leading
"/"
+                //
+                //       https://issues.apache.org/jira/browse/GSHELL-86
+                //
+                if (path != null && path.startsWith("/")) {
+                    path = path.substring(1, path.length());
+                }
+                
                 io.out.print("  ");
-                io.out.println(renderer.render(Renderer.encode(node.getPath(), Code.BOLD)));
+                io.out.println(renderer.render(Renderer.encode(path, Code.BOLD)));
 
                 io.out.println();
                 displayGroupCommands(node);



Mime
View raw message