jline.console.history.MemoryHistory Java Examples

The following examples show how to use jline.console.history.MemoryHistory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Terminal.java    From cloudml with GNU Lesser General Public License v3.0 5 votes vote down vote up
public Terminal(Configuration configuration) {
    try {
        this.configuration = configuration;

        jline.TerminalFactory.configure("auto");

        reader = new ConsoleReader();
        reader.setHistory(new MemoryHistory());
        reader.addCompleter(new ArgumentCompleter(selectCompleters()));
    
    } catch (IOException ex) {
        throw new RuntimeException(ex);
    }
}
 
Example #2
Source File: EditingHistory.java    From try-artifact with GNU General Public License v2.0 4 votes vote down vote up
protected EditingHistory(Preferences prefs) {
    this.prefs = prefs;
    this.fullHistory = new MemoryHistory();
    this.currentDelegate = fullHistory;
    load();
}