Skip to content

Commit

Permalink
Fixed repl demo shell help, step II
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed May 3, 2020
1 parent 9613ec3 commit 496492e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion demo/src/main/java/org/jline/demo/Repl.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ private void shell(CommandInput input) {
, "Usage: !<command>"
, " -? --help Displays command help" };
if (input.args().length == 1 && (input.args()[0].equals("-?") || input.args()[0].equals("--help"))) {
Options.HelpException.highlight(String.join("\n", usage), Styles.helpStyle()).println(terminal());
try {
parseOptions(usage, input.args());
} catch (Exception e) {
saveException(e);
}
} else {
List<String> argv = new ArrayList<>();
argv.addAll(Arrays.asList(input.args()));
Expand Down

0 comments on commit 496492e

Please sign in to comment.