File history = new File(forgeHome, "history");
File alias = new File(forgeHome, "alias");
File export = new File(forgeHome, "export");
final ForgeCommandRegistry registry =
new ForgeCommandRegistry(this, addonRegistry);
SettingsBuilder newSettings = new SettingsBuilder(settings)
.historyFile(history)
.aliasFile(alias)
.exportFile(export)
.enableExport(true)
.setExportUsesSystemEnvironment(true)
.interruptHook(new ForgeInterruptHook(registry));
// If system property is set, force POSIXTerminal
if (Boolean.getBoolean("org.jboss.forge.addon.shell.forcePOSIXTerminal"))
{
newSettings.terminal(new POSIXTerminal());
}
this.console = new AeshConsoleBuilder()
.prompt(createPrompt(initialResource))
.settings(newSettings.create())
.commandRegistry(registry)
.commandNotFoundHandler(new ForgeCommandNotFoundHandler(registry))
.create();
this.output = new ShellUIOutputImpl(console);
setCurrentResource(initialResource);