Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 49D77200C78 for ; Wed, 3 May 2017 16:22:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 48AFA160BB5; Wed, 3 May 2017 14:22:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9F089160BAA for ; Wed, 3 May 2017 16:22:00 +0200 (CEST) Received: (qmail 8983 invoked by uid 500); 3 May 2017 14:21:59 -0000 Mailing-List: contact commits-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list commits@karaf.apache.org Received: (qmail 8970 invoked by uid 99); 3 May 2017 14:21:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2017 14:21:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B91EDDF9A3; Wed, 3 May 2017 14:21:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: gnodet@apache.org To: commits@karaf.apache.org Date: Wed, 03 May 2017 14:21:59 -0000 Message-Id: <2114223fe2654918a05cd5388e573a0f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] karaf git commit: [KARAF-5096] Fix the bundle:info command, help command, etc... archived-at: Wed, 03 May 2017 14:22:01 -0000 Repository: karaf Updated Branches: refs/heads/karaf-4.1.x 9e6f8c9bf -> c2d70bd23 [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/e6c2447c Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/e6c2447c Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/e6c2447c Branch: refs/heads/karaf-4.1.x Commit: e6c2447c66983378de16c9e0f15eb5862ce54c11 Parents: 9e6f8c9 Author: Guillaume Nodet Authored: Wed May 3 14:14:02 2017 +0200 Committer: Guillaume Nodet Committed: Wed May 3 16:19:40 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/e6c2447c/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/e6c2447c/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/e6c2447c/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/e6c2447c/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 {