Search in sources :

Example 1 with SettingsBuilder

use of org.jboss.aesh.console.settings.SettingsBuilder in project metron by apache.

the class StellarShell method createConsole.

/**
 * Creates the REPL's console.
 * @param commandLine The command line options.
 */
private Console createConsole(CommandLine commandLine) {
    // console settings
    boolean useAnsi = !commandLine.hasOption("na");
    SettingsBuilder settings = new SettingsBuilder().enableAlias(true).enableMan(true).ansi(useAnsi).parseOperators(false).inputStream(PausableInput.INSTANCE);
    if (commandLine.hasOption("irc")) {
        settings = settings.inputrc(new File(commandLine.getOptionValue("irc")));
    }
    return new Console(settings.create());
}
Also used : SettingsBuilder(org.jboss.aesh.console.settings.SettingsBuilder) Console(org.jboss.aesh.console.Console) File(java.io.File)

Aggregations

File (java.io.File)1 Console (org.jboss.aesh.console.Console)1 SettingsBuilder (org.jboss.aesh.console.settings.SettingsBuilder)1