geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r706624 - /geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java
Date Tue, 21 Oct 2008 13:38:31 GMT
Author: jdillon
Date: Tue Oct 21 06:38:31 2008
New Revision: 706624

URL: http://svn.apache.org/viewvc?rev=706624&view=rev
Log:
Set "_" in the shell's context to the return value of the command action

Modified:
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java?rev=706624&r1=706623&r2=706624&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/CommandSupport.java
Tue Oct 21 06:38:31 2008
@@ -318,6 +318,9 @@
 
             log.trace("Result: {}", value);
 
+            // Save the result to the shell's context under "_"
+            context.getVariables().set("_", value);
+
             result = new CommandResult.ValueResult(value);
         }
         catch (final FailureNotification n) {



Mime
View raw message