You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by jb...@apache.org on 2020/04/04 06:08:18 UTC
[felix-dev] branch master updated: [FELIX-6214] Upgrade to jline
3.13.x (with code change) and narrow import range
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new 917acfa [FELIX-6214] Upgrade to jline 3.13.x (with code change) and narrow import range
917acfa is described below
commit 917acfa1f763aafef657abcdd1585aaae5a4075d
Author: jbonofre <jb...@apache.org>
AuthorDate: Sat Apr 4 08:07:59 2020 +0200
[FELIX-6214] Upgrade to jline 3.13.x (with code change) and narrow import range
---
gogo/jline/pom.xml | 4 ++--
.../src/main/java/org/apache/felix/gogo/jline/Builtin.java | 12 ++++++------
.../src/main/java/org/apache/felix/gogo/jline/Posix.java | 9 +++++++--
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/gogo/jline/pom.xml b/gogo/jline/pom.xml
index bc7de1f..01e7f14 100644
--- a/gogo/jline/pom.xml
+++ b/gogo/jline/pom.xml
@@ -61,7 +61,7 @@
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
- <version>3.7.0</version>
+ <version>3.13.2</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
@@ -91,7 +91,7 @@
</Export-Package>
<Import-Package>
!org.apache.felix.gogo.runtime.threadio,
- org.jline*;version="[3.0,4)",
+ org.jline*;version="[3.13,4)",
*
</Import-Package>
</instructions>
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java
index 0e4190d..87d616d 100644
--- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java
+++ b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Builtin.java
@@ -638,12 +638,12 @@ public class Builtin {
return list;
}
- public void history(CommandSession session, String[] argv) throws IOException {
+ public void history(CommandSession session, String[] argv) throws Exception {
Process process = Process.Utils.current();
- Commands.history(Shell.getReader(session), process.out(), process.err(), argv);
+ Commands.history(Shell.getReader(session), process.out(), process.err(), null, argv);
}
- public void complete(CommandSession session, String[] argv) {
+ public void complete(CommandSession session, String[] argv) throws Exception {
Process process = Process.Utils.current();
Commands.complete(Shell.getReader(session), process.out(), process.err(), Shell.getCompletions(session), argv);
}
@@ -662,17 +662,17 @@ public class Builtin {
Commands.widget(Shell.getReader(session), process.out(), process.err(), creator, argv);
}
- public void keymap(CommandSession session, String[] argv) {
+ public void keymap(CommandSession session, String[] argv) throws Exception {
Process process = Process.Utils.current();
Commands.keymap(Shell.getReader(session), process.out(), process.err(), argv);
}
- public void setopt(CommandSession session, String[] argv) {
+ public void setopt(CommandSession session, String[] argv) throws Exception {
Process process = Process.Utils.current();
Commands.setopt(Shell.getReader(session), process.out(), process.err(), argv);
}
- public void unsetopt(CommandSession session, String[] argv) {
+ public void unsetopt(CommandSession session, String[] argv) throws Exception {
Process process = Process.Utils.current();
Commands.unsetopt(Shell.getReader(session), process.out(), process.err(), argv);
}
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java
index 44424d5..9ead00c 100644
--- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java
+++ b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java
@@ -957,7 +957,7 @@ public class Posix {
return;
}
- Less less = new Less(Shell.getTerminal(session));
+ Less less = new Less(Shell.getTerminal(session), null);
less.quitAtFirstEof = opt.isSet("QUIT-AT-EOF");
less.quitAtSecondEof = opt.isSet("quit-at-eof");
less.quiet = opt.isSet("quiet");
@@ -966,7 +966,7 @@ public class Posix {
less.ignoreCaseAlways = opt.isSet("IGNORE-CASE");
less.ignoreCaseCond = opt.isSet("ignore-case");
if (opt.isSet("tabs")) {
- less.tabs = opt.getNumber("tabs");
+ less.tabs(Collections.singletonList(opt.getNumber("tabs")));
}
less.printLineNumbers = opt.isSet("LINE-NUMBERS");
if (hasExtendedOptions) {
@@ -2122,5 +2122,10 @@ public class Posix {
public InputStream read() {
return process.in();
}
+
+ @Override
+ public Long lines() {
+ return null;
+ }
}
}