This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AeshExample { | |
| private static AeshConsoleImpl aeshConsole; | |
| public static void main(String[] args) throws CommandLineParserException { | |
| CommandBuilder fooCommand = new CommandBuilder() | |
| .name("foo") | |
| .description("fooing") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AddUserExample { | |
| public static void main(String[] args) { | |
| Settings settings = | |
| new SettingsBuilder() | |
| .logging(false) | |
| .readInputrc(false) | |
| .disableCompletion(true) | |
| .disableHistory(true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jboss.aesh.cl.CommandDefinition; | |
| import org.jboss.aesh.cl.GroupCommandDefinition; | |
| import org.jboss.aesh.cl.Option; | |
| import org.jboss.aesh.console.AeshConsole; | |
| import org.jboss.aesh.console.AeshConsoleBuilder; | |
| import org.jboss.aesh.console.Prompt; | |
| import org.jboss.aesh.console.command.Command; | |
| import org.jboss.aesh.console.command.CommandResult; | |
| import org.jboss.aesh.console.command.invocation.CommandInvocation; | |
| import org.jboss.aesh.console.command.registry.AeshCommandRegistryBuilder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @CommandDefinition(name = "testparams", description = "") | |
| public class TestParams implements Command { | |
| @Option(shortName = 'f', description = "set the foo value") | |
| private String foo; | |
| @Option(shortName = 'b', required = true) | |
| private String bar; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jboss.aesh.console.AeshConsoleCallback; | |
| import org.jboss.aesh.console.Console; | |
| import org.jboss.aesh.console.ConsoleCallback; | |
| import org.jboss.aesh.console.ConsoleOperation; | |
| import org.jboss.aesh.console.Prompt; | |
| import org.jboss.aesh.console.settings.SettingsBuilder; | |
| public class ConsoleExample { | |
| public static void main(String... args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jboss.aesh.cl.Arguments; | |
| import org.jboss.aesh.cl.CommandDefinition; | |
| import org.jboss.aesh.console.AeshConsole; | |
| import org.jboss.aesh.console.AeshConsoleBuilder; | |
| import org.jboss.aesh.console.Prompt; | |
| import org.jboss.aesh.console.command.Command; | |
| import org.jboss.aesh.console.command.CommandResult; | |
| import org.jboss.aesh.console.command.invocation.CommandInvocation; | |
| import org.jboss.aesh.console.command.registry.AeshCommandRegistryBuilder; | |
| import org.jboss.aesh.console.command.registry.CommandRegistry; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat aeshtest.sh | |
| #!/bin/bash | |
| java -cp . AeshExample <<EOFDEL | |
| login | |
| admin | |
| admin!234 | |
| ls | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface HibernateValueMapper { | |
| void $hibernate_setValue(Object value, String fieldName); | |
| } | |
| bytecode impl in entities: | |
| ... | |
| public void $hibernate_setValue(Object value, String fieldName) { | |
| if(fieldName == "name") | |
| name = (String) value; | |
| else if(fieldName == "address"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [general] | |
| accounts = work | |
| maxsyncaccounts = 1 | |
| maxconnections = 1 | |
| ui = Noninteractive.Basic | |
| #ui = Noninteractive.quiet | |
| # -------------------- Work details. -------------------- | |
| [Account work] | |
| localrepository = work-Local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set default values for all following accounts. | |
| defaults | |
| #tls on | |
| #tls_trust_file /etc/ssl/certs/ca-certificates.crt | |
| logfile ~/.msmtp.log | |
| # redhat | |
| account redhat | |
| host smtp.corp.redhat.com | |
| from [email protected] |