Examples of SettingsBuilder


Examples of org.jboss.aesh.console.settings.SettingsBuilder

   public ShellImpl(FileResource<?> initialResource, Settings settings, CommandManager commandManager,
            AddonRegistry addonRegistry)
   {
      this.currentResource = initialResource;
      this.addonRegistry = addonRegistry;
      Settings newSettings = new SettingsBuilder(settings).interruptHook(new InterruptHook()
      {
         @Override
         public void handleInterrupt(Console console)
         {
            console.getShell().out().println("^C");
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

   public void startupDefaultShell(@Observes PostStartup startup) throws Exception
   {
      if (Boolean.getBoolean("forge.standalone"))
      {
         Settings settings = new SettingsBuilder().create();
         this.shell = shellFactory.createShell(OperatingSystemUtils.getWorkingDir(), settings);
      }
   }
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

* @author <a href="mailto:stale.pedersen@jboss.org">Ståle W. Pedersen</a>
*/
public class AeshExampleExtension {

    public static void main(String[] args) throws IOException {
        SettingsBuilder settingsBuilder = new SettingsBuilder();
        settingsBuilder.readInputrc(false);
        settingsBuilder.logging(true);

        CommandRegistry registry = new AeshCommandRegistryBuilder()
                .command(ExitCommand.class)
                .command(Less.class)
                .command(More.class)
                .command(Harlem.class)
                .command(Matrix.class)
                .command(GroovyCommand.class)
                .command(Ls.class)
                .command(Grep.class)
                .command(Cat.class)
                .create();

        AeshConsole aeshConsole = new AeshConsoleBuilder()
                .commandRegistry(registry)
                .settings(settingsBuilder.create())
                .prompt(new Prompt("[aesh@extensions]$ "))
                .create();

        aeshConsole.start();
    }
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

public class ExampleExtension {

    public static void main(String[] args) throws IOException {

        //Settings.getInstance().setAnsiConsole(false);
        SettingsBuilder settingsBuilder = new SettingsBuilder();
        settingsBuilder.readInputrc(false);
        settingsBuilder.logging(true);
        final Console exampleConsole = new Console(settingsBuilder.create());

        PrintWriter out = new PrintWriter(System.out);

        final Man man = new Man(exampleConsole);
        //man.addPage(new File("/tmp/README.md"), "test");
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

* @author <a href="mailto:stale.pedersen@jboss.org">Ståle W. Pedersen</a>
*/
public class AeshExampleExtension {

    public static void main(String[] args) throws IOException {
        SettingsBuilder settingsBuilder = new SettingsBuilder();
        settingsBuilder.readInputrc(false);
        settingsBuilder.logging(true);

        CommandRegistry registry = new AeshCommandRegistryBuilder()
                .command(ExitCommand.class)
                .command(Less.class)
                .command(More.class)
                .command(Harlem.class)
                .command(Clear.class)
                .command(Matrix.class)
                .command(GroovyCommand.class)
                .command(Ls.class)
                .command(Grep.class)
                .command(Cat.class)
                .command(Cd.class)
                .command(Pwd.class)
                .command(Touch.class)
                .command(Pushd.class)
                .command(Popd.class)
                .create();

        AeshConsole aeshConsole = new AeshConsoleBuilder()
                .commandRegistry(registry)
                .settings(settingsBuilder.create())
                .prompt(new Prompt("[aesh@extensions]$ "))
                .create();

        aeshConsole.start();
    }
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

* @author <a href="mailto:stale.pedersen@jboss.org">Ståle W. Pedersen</a>
*/
public class AeshExampleExtension {

    public static void main(String[] args) throws IOException {
        SettingsBuilder settingsBuilder = new SettingsBuilder();
        settingsBuilder.readInputrc(false);
        settingsBuilder.logging(true);

        CommandRegistry registry = new AeshCommandRegistryBuilder()
                .command(ExitCommand.class)
                .command(Less.class)
                .command(More.class)
                //.command(man)
                .command(Harlem.class)
                .command(Matrix.class)
                .command(GroovyCommand.class)
                .command(Ls.class)
                .command(Grep.class)
                .create();

        AeshConsole aeshConsole = new AeshConsoleBuilder()
                .commandRegistry(registry)
                .settings(settingsBuilder.create())
                .prompt(new Prompt("[aesh@extensions]$ "))
                .create();

        aeshConsole.start();
    }
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

public class ExampleExtension {

    public static void main(String[] args) throws IOException {

        //Settings.getInstance().setAnsiConsole(false);
        SettingsBuilder settingsBuilder = new SettingsBuilder();
        settingsBuilder.readInputrc(false);
        settingsBuilder.logging(true);
        final Console exampleConsole = new Console(settingsBuilder.create());

        PrintWriter out = new PrintWriter(System.out);

        final Man man = new Man(exampleConsole);
        //man.addPage(new File("/tmp/README.md"), "test");
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

                              {
                                 return terminalSize.getHeight();
                              }
                           });

                  Settings settings = new SettingsBuilder()
                           .inputStream(new PipedInputStream(stdin))
                           .outputStream(stdout)
                           .outputStreamError(stderr)
                           .terminal(terminal)
                           .create();
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

      public Settings getSettings()
      {
         try
         {
            inputStream = new PipedInputStream(stdin);
            settings = new SettingsBuilder()
                     .inputStream(inputStream)
                     .outputStream(new PrintStream(stdout))
                     .outputStreamError(new PrintStream(stderr))
                     .name("test")
                     .logging(true)
View Full Code Here

Examples of org.jboss.aesh.console.settings.SettingsBuilder

      public Settings getSettings()
      {
         try
         {
            inputStream = new PipedInputStream(stdin);
            settings = new SettingsBuilder()
                     .inputStream(inputStream)
                     .outputStream(new PrintStream(stdout))
                     .outputStreamError(new PrintStream(stderr))
                     .name("test")
                     .logging(true)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.