.option(Option.DISABLE_EVENT_EXPANSION, false) .expander(new KsqlExpander()) .parser(new TrimmingParser(new KsqlLineParser(parser, cliLinePredicate))) .terminal(terminal) .build();
.terminal(terminal) .appName(CliStrings.CLI_NAME) .parser(new SqlMultiLineParser()) .completer(new SqlCompleter(context, executor)) .build();
.terminal(terminal) .completer(new PicocliJLineCompleter(cmd.getCommandSpec())) .parser(new DefaultParser()) .build(); commands.setReader(reader);
public JLineConsole(String defaultPath) throws IOException { super(defaultPath); DefaultParser parser = new DefaultParser(); //It will be applied from jline 3.9.1 //parser.setEscapeChars(null); this.terminal = TerminalBuilder.builder().encoding(encoding).build(); this.reader = LineReaderBuilder.builder() .appName(APP_NAME) .parser(parser) .terminal(terminal) .build(); this.commandReader = LineReaderBuilder.builder() .appName(APP_NAME) .completer(commandCompleter) .parser(parser) .terminal(terminal) .build(); }
.parser(parser) .build(); reader.setVariable(LineReader.HISTORY_FILE, historyFile.toPath());
@Override public String readLine(String prompt, Character mask) throws IOException { LineReader reader = LineReaderBuilder.builder() .terminal(jlineTerminal) .appName("karaf") .parser((line, cursor, context) -> new SimpleParsedLine(line, cursor)) .build(); reader.setOpt(LineReader.Option.DISABLE_EVENT_EXPANSION); reader.setVariable(LineReader.DISABLE_HISTORY, Boolean.TRUE); reader.setVariable(LineReader.DISABLE_COMPLETION, Boolean.TRUE); return reader.readLine(prompt, mask); }
@Override public String readLine(String prompt, Character mask) throws IOException { LineReader reader = LineReaderBuilder.builder() .terminal(jlineTerminal) .appName("karaf") .parser((line, cursor, context) -> new SimpleParsedLine(line, cursor)) .build(); reader.setOpt(LineReader.Option.DISABLE_EVENT_EXPANSION); reader.setVariable(LineReader.DISABLE_HISTORY, Boolean.TRUE); reader.setVariable(LineReader.DISABLE_COMPLETION, Boolean.TRUE); return reader.readLine(prompt, mask); }
.completer(new org.jline.builtins.Completers.Completer(completionEnvironment)) .highlighter(new Highlighter(session)) .parser(new Parser()) .expander(new Expander(session)) .build();
.variables(((CommandSessionImpl) session).getVariables()) .highlighter(new org.apache.felix.gogo.jline.Highlighter(session)) .parser(new KarafParser(this)) .completer(completer) .build();
.variables(((CommandSessionImpl) session).getVariables()) .highlighter(new org.apache.felix.gogo.jline.Highlighter(session)) .parser(new KarafParser(this)) .completer(completer) .build();
.appName(CliConstants.APP_NAME) .terminal(terminal) .parser(parser) .highlighter(new CliHighlighter()) .completer(new StringsCompleter(CliCommandType.getAllCommands()))
.terminal(terminal) .completer(completer) .parser(parser) .build(); this.reader = reader;
.parser(new SqlLineParser(this)) .variable(LineReader.HISTORY_FILE, getOpts().getHistoryFile()) .option(LineReader.Option.DISABLE_EVENT_EXPANSION, true);
.parser(new SqlLineParser(this)) .variable(LineReader.HISTORY_FILE, getOpts().getHistoryFile()) .option(LineReader.Option.DISABLE_EVENT_EXPANSION, true);