karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [1/3] karaf git commit: [KARAF-5096] Fix the bundle:info command, help command, etc...
Date Wed, 03 May 2017 13:40:06 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 500838f64 -> e8bbe3bd7


[KARAF-5096] Fix the bundle:info command, help command, etc...

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/c1917046
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/c1917046
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/c1917046

Branch: refs/heads/master
Commit: c1917046f6af2c6d73ea658367cb00a3bc787877
Parents: 500838f
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Wed May 3 14:14:02 2017 +0200
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Wed May 3 14:14:02 2017 +0200

----------------------------------------------------------------------
 .../base/src/main/resources/resources/etc/shell.init.script      | 2 +-
 .../core/src/main/java/org/apache/karaf/bundle/command/Info.java | 2 +-
 .../org/apache/karaf/instance/resources/etc/shell.init.script    | 2 +-
 .../impl/console/commands/help/SingleCommandHelpProvider.java    | 4 +++-
 4 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/c1917046/assemblies/features/base/src/main/resources/resources/etc/shell.init.script
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/etc/shell.init.script b/assemblies/features/base/src/main/resources/resources/etc/shell.init.script
index 11334be..9639231 100644
--- a/assemblies/features/base/src/main/resources/resources/etc/shell.init.script
+++ b/assemblies/features/base/src/main/resources/resources/etc/shell.init.script
@@ -33,7 +33,7 @@ service:get = { $.context getService ($.context getServiceReference $args)
};
 
 env = { shell:set $args }
 edit = { shell:nano $args }
-more = { shell:less $args }
+more = { shell:less -F $args }
 
 prompt = "${USER}@${APPLICATION}(${SUBSHELL})> "
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/c1917046/bundle/core/src/main/java/org/apache/karaf/bundle/command/Info.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/Info.java b/bundle/core/src/main/java/org/apache/karaf/bundle/command/Info.java
index 01b7623..a552035 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/Info.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/Info.java
@@ -38,7 +38,7 @@ public class Info extends BundlesCommand {
      */
     @Override
     protected void executeOnBundle(Bundle bundle) throws Exception {
-        session.execute("help 'bundle|" + bundle.getBundleId() + "'");
+        session.execute("*:help 'bundle|" + bundle.getBundleId() + "'");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/karaf/blob/c1917046/instance/src/main/resources/org/apache/karaf/instance/resources/etc/shell.init.script
----------------------------------------------------------------------
diff --git a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/shell.init.script
b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/shell.init.script
index 11334be..9639231 100644
--- a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/shell.init.script
+++ b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/shell.init.script
@@ -33,7 +33,7 @@ service:get = { $.context getService ($.context getServiceReference $args)
};
 
 env = { shell:set $args }
 edit = { shell:nano $args }
-more = { shell:less $args }
+more = { shell:less -F $args }
 
 prompt = "${USER}@${APPLICATION}(${SUBSHELL})> "
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/c1917046/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/help/SingleCommandHelpProvider.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/help/SingleCommandHelpProvider.java
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/help/SingleCommandHelpProvider.java
index 903a021..e8d7b23 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/help/SingleCommandHelpProvider.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/commands/help/SingleCommandHelpProvider.java
@@ -17,6 +17,7 @@
  */
 package org.apache.karaf.shell.impl.console.commands.help;
 
+import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
@@ -33,9 +34,10 @@ public class SingleCommandHelpProvider implements HelpProvider {
             }
         }
 
+        ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         PrintStream ps = new PrintStream(baos, true);
-        Session s = session.getFactory().create(null, ps, ps, session);
+        Session s = session.getFactory().create(bais, ps, ps, session);
         s.put(Session.SCOPE, session.get(Session.SCOPE));
         s.put(Session.SUBSHELL, session.get(Session.SUBSHELL));
         try {


Mime
View raw message