Skip to content

Commit

Permalink
updated JLine version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn authored and remkop committed Dec 25, 2018
1 parent 63285e2 commit cfc1106
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ task bumpReadmeVersion {
fileset(dir: '.', includes: 'README.md')
fileset(dir: './picocli-codegen/', includes: 'README.md')
fileset(dir: './picocli-shell-jline2/', includes: 'README.md')
fileset(dir: './picocli-shell-jline3/', includes: 'README.md')
}
}
}
Expand Down
14 changes: 10 additions & 4 deletions picocli-shell-jline3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The picocli user manual is [here](https://picocli.info), and the GitHub project

## Command Completer
`PicocliJLineCompleter` is a small component that generates completion candidates to allow users to
get command line TAB auto-completion for a picocli-based application running in a JLine 2 shell.
get command line TAB auto-completion for a picocli-based application running in a JLine 3 shell.

## Example

Expand Down Expand Up @@ -58,7 +58,7 @@ import picocli.shell.jline3.PicocliJLineCompleter;

/**
* Example that demonstrates how to build an interactive shell with JLine3 and picocli.
* @since 3.7
* @since 3.9
*/
public class Example {

Expand Down Expand Up @@ -144,8 +144,14 @@ public class Example {
// start the shell and process input until the user quits with Ctl-D
String line;
while (true) {
line = reader.readLine(prompt, rightPrompt, (MaskingCallback) null, null);
CommandLine.run(commands, line.split("\\s+"));
try {
line = reader.readLine(prompt, rightPrompt, (MaskingCallback) null, null);
CommandLine.run(commands, line.split("\\s+"));
} catch (UserInterruptException e) {
// Ignore
} catch (EndOfFileException e) {
return;
}
}
} catch (Throwable t) {
t.printStackTrace();
Expand Down
12 changes: 6 additions & 6 deletions picocli-shell-jline3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'info.picocli'
description 'Picocli Shell JLine2 - easily build interactive shell applications with JLine 2 and picocli.'
description 'Picocli Shell JLine3 - easily build interactive shell applications with JLine 3 and picocli.'
version "$projectVersion"
sourceCompatibility = 1.5

Expand All @@ -17,20 +17,20 @@ dependencies {

jar {
manifest {
attributes 'Specification-Title' : 'Picocli Shell JLine2',
attributes 'Specification-Title' : 'Picocli Shell JLine3',
'Specification-Vendor' : 'Remko Popma',
'Specification-Version' : version,
'Implementation-Title' : 'Picocli Shell JLine2',
'Implementation-Title' : 'Picocli Shell JLine3',
'Implementation-Vendor' : 'Remko Popma',
'Implementation-Version': version,
'Automatic-Module-Name' : 'info.picocli.shell.jline2'
'Automatic-Module-Name' : 'info.picocli.shell.jline3'
}
}

ext {
bintrayBaseUrl = 'https://api.bintray.com/maven'
bintrayRepository = 'picocli'
bintrayPackage = 'picocli-shell-jline2'
bintrayPackage = 'picocli-shell-jline3'
bintrayUsername = System.getenv('BINTRAY_USER')
bintrayApiKey = System.getenv('BINTRAY_KEY')
}
Expand All @@ -45,7 +45,7 @@ publishing {
pom.withXml {
def root = asNode()
root.appendNode('packaging', 'jar')
root.appendNode('name', 'picocli-shell-jline2')
root.appendNode('name', 'picocli-shell-jline3')
root.appendNode('description', description)
root.appendNode('url', 'http://picocli.info')
root.appendNode('inceptionYear', '2018')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
* Example that demonstrates how to build an interactive shell with JLine3 and picocli.
* @since 3.7
* @since 3.9
*/
public class Example {

Expand Down Expand Up @@ -117,8 +117,7 @@ public static void main(String[] args) {
// Ignore
} catch (EndOfFileException e) {
return;
}

}
}
} catch (Throwable t) {
t.printStackTrace();
Expand Down

0 comments on commit cfc1106

Please sign in to comment.