felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r803184 - in /felix/trunk/karaf/gshell/gshell-commands/src/main: java/org/apache/felix/karaf/gshell/commands/EchoAction.java java/org/apache/felix/karaf/gshell/commands/EchoCommand.java resources/OSGI-INF/blueprint/gshell-commands.xml
Date Tue, 11 Aug 2009 16:19:21 GMT
Author: gnodet
Date: Tue Aug 11 16:19:20 2009
New Revision: 803184

URL: http://svn.apache.org/viewvc?rev=803184&view=rev
Log:
Enable built-in echo command

Added:
    felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoAction.java
      - copied, changed from r803131, felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoCommand.java
Removed:
    felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoCommand.java
Modified:
    felix/trunk/karaf/gshell/gshell-commands/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml

Copied: felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoAction.java
(from r803131, felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoCommand.java)
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoAction.java?p2=felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoAction.java&p1=felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoCommand.java&r1=803131&r2=803184&rev=803184&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoCommand.java
(original)
+++ felix/trunk/karaf/gshell/gshell-commands/src/main/java/org/apache/felix/karaf/gshell/commands/EchoAction.java
Tue Aug 11 16:19:20 2009
@@ -8,12 +8,12 @@
 import org.apache.felix.karaf.gshell.console.OsgiCommandSupport;
 
 @Command(scope = "shell", name = "echo", description="Echo or print arguments to STDOUT")
-public class EchoCommand extends OsgiCommandSupport
+public class EchoAction extends OsgiCommandSupport
 {
     @Option(name="-n", description="Do not print the trailing newline character")
-    private boolean trailingNewline = true;
+    private boolean noTrailingNewline = false;
 
-    @Argument(description="Arguments")
+    @Argument(description="Arguments", multiValued = true)
     private List<String> args;
 
     protected Object doExecute() throws Exception {
@@ -28,7 +28,7 @@
             }
         }
 
-        if (trailingNewline) {
+        if (!noTrailingNewline) {
             System.out.println();
         }
 

Modified: felix/trunk/karaf/gshell/gshell-commands/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-commands/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml?rev=803184&r1=803183&r2=803184&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-commands/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml
(original)
+++ felix/trunk/karaf/gshell/gshell-commands/src/main/resources/OSGI-INF/blueprint/gshell-commands.xml
Tue Aug 11 16:19:20 2009
@@ -23,15 +23,31 @@
         <command name="shell/cat">
             <action class="org.apache.felix.karaf.gshell.commands.CatAction"/>
         </command>
+        <command name="shell/echo">
+            <action class="org.apache.felix.karaf.gshell.commands.EchoAction"/>
+        </command>
         <command name="shell/exec">
             <action class="org.apache.felix.karaf.gshell.commands.ExecuteAction"/>
         </command>
         <command name="shell/grep">
             <action class="org.apache.felix.karaf.gshell.commands.GrepAction"/>
         </command>
+        <!--
+        <command name="shell/history">
+            <action class="org.apache.felix.karaf.gshell.commands.HistoryAction"/>
+        </command>
+        -->
+        <command name="shell/info">
+            <action class="org.apache.felix.karaf.gshell.commands.InfoAction"/>
+        </command>
         <command name="shell/java">
             <action class="org.apache.felix.karaf.gshell.commands.JavaAction"/>
         </command>
+        <!--
+        <command name="shell/more">
+            <action class="org.apache.felix.karaf.gshell.commands.MoreAction"/>
+        </command>
+        -->
         <command name="shell/printf">
             <action class="org.apache.felix.karaf.gshell.commands.PrintfAction"/>
         </command>
@@ -41,6 +57,11 @@
         <command name="shell/sort">
             <action class="org.apache.felix.karaf.gshell.commands.SortAction"/>
         </command>
+        <!--
+        <command name="shell/source">
+            <action class="org.apache.felix.karaf.gshell.commands.SourceAction"/>
+        </command>
+        -->
     </command-bundle>
 
 </blueprint>



Mime
View raw message