public void setHistory(final History history) { assert history != null; reader.setHistory(history); }
public void setHistory(final History history) { assert history != null; reader.setHistory(history); }
@Override protected ConsoleReader createConsoleReader() { ConsoleReader consoleReader = super.createConsoleReader(); consoleReader.setHistory(gfshHistory); terminal = consoleReader.getTerminal(); return consoleReader; }
protected void initJLine() { History history = new History(); /* try { history = new History(new File(".consolehistory")); } catch (IOException e) { log.warn("Cannot read or write file for storing command line history: " + e.getMessage() + ""); history = new History(); } */ reader.setHistory(history); reader.setUseHistory(true); setCompletor(); }
consoleReader.setHistory(consoleHistory);
private void initJline() throws Exception { // String osName = System.getProperty("os.name"); // if (osName.startsWith("Windows")) { // return; // } consoleReader = new ConsoleReader(); consoleReader.setBellEnabled(false); // consoleReader.setDebug(new java.io.PrintWriter("jline-debug.txt")); History history = consoleReader.getHistory(); if (history == null) { history = new History(); consoleReader.setHistory(history); } File historyFile = new File(System.getProperty("user.home"), ".gfshhistory"); history.setHistoryFile(historyFile); // reader.setDebug(new PrintWriter(new FileWriter("writer.debug", true))); List completors = new LinkedList(); completors.add(new SimpleCompletor(commands)); consoleReader.addCompletor(new ArgumentCompletor(completors)); }
reader.setHistory(history);
History history = new History(); history.setHistoryFile(new File(MUTANT_HISTORY)); reader.setHistory(history); } catch (IOException e) { System.err.println("Could not find history file");
protected static void initReadline(Ruby runtime, ConsoleHolder holder) throws IOException { holder.readline = new ConsoleReader(); holder.readline.setUseHistory(false); holder.readline.setUsePagination(true); holder.readline.setBellEnabled(false); ((CandidateListCompletionHandler) holder.readline.getCompletionHandler()).setAlwaysIncludeNewline(false); if (holder.currentCompletor == null) { holder.currentCompletor = new RubyFileNameCompletor(); } holder.readline.addCompletor(holder.currentCompletor); holder.readline.setHistory(holder.history); }
if ((new File(historyDirectory)).exists()) { String historyFile = historyDirectory + File.separator + HISTORYFILE; reader.setHistory(new History(new File(historyFile))); } else { System.err.println("WARNING: Directory for Hive history file: " + historyDirectory +