@Override public String line() { return cmdLine.getBuffer(); } @Override
default void completeCandidates(Session session, CommandLine commandLine, List<Candidate> candidates) { List<String> strings = new ArrayList<>(); int idx = complete(session, commandLine, strings); String word = ""; if (idx > commandLine.getBufferPosition() - commandLine.getArgumentPosition()) { word = commandLine.getBuffer().substring(commandLine.getBufferPosition() - commandLine.getArgumentPosition(), idx); } for (String string : strings) { String str = word + string; if (str.endsWith(" ")) { candidates.add(new Candidate(str.substring(0, str.length() - 1), true)); } else { candidates.add(new Candidate(word + string, false)); } } } }
default void completeCandidates(Session session, CommandLine commandLine, List<Candidate> candidates) { List<String> strings = new ArrayList<>(); int idx = complete(session, commandLine, strings); String word = ""; if (idx > commandLine.getBufferPosition() - commandLine.getArgumentPosition()) { word = commandLine.getBuffer().substring(commandLine.getBufferPosition() - commandLine.getArgumentPosition(), idx); } for (String string : strings) { String str = word + string; if (str.endsWith(" ")) { candidates.add(new Candidate(str.substring(0, str.length() - 1), true)); } else { candidates.add(new Candidate(word + string, false)); } } } }
@Override public String line() { return cmdLine.getBuffer(); } @Override
String buffer = list.getBuffer(); int cursor = list.getBufferPosition(); if ((buffer != null) && (cursor != buffer.length()) && isDelimiter(buffer, cursor)) {
parsed.append(cmdParser.preprocess(session, cmdLine)); int length = cmdLine.getBuffer().length(); if (length < rem.length()) { char ch = rem.charAt(length);
String buffer = list.getBuffer(); int cursor = list.getBufferPosition(); if ((buffer != null) && (cursor != buffer.length()) && isDelimiter(buffer, cursor)) {
parsed.append(cmdParser.preprocess(session, cmdLine)); int length = cmdLine.getBuffer().length(); if (length < rem.length()) { char ch = rem.charAt(length);
int length = cmdLine.getBuffer().length(); if (length < rem.length()) { char ch = rem.charAt(length);
int length = cmdLine.getBuffer().length(); if (length < rem.length()) { char ch = rem.charAt(length);