Examples of StdShellCommand


Examples of restx.shell.StdShellCommand

*/
@Module
public class SystemCommands {

    @Provides public ShellCommand cd() {
        return new StdShellCommand(ImmutableList.of("cd"), "change current directory") {
            @Override
            protected Optional<? extends ShellCommandRunner> doMatch(String line) {
                List<String> args = splitArgs(line);

                if (args.size() < 2) {
View Full Code Here

Examples of restx.shell.StdShellCommand

            }
        };
    }

    @Provides public ShellCommand pwd() {
        return new StdShellCommand(ImmutableList.of("pwd"), "print current directory") {
            @Override
            protected Optional<? extends ShellCommandRunner> doMatch(String line) {
                return Optional.of(new ShellCommandRunner() {
                    @Override
                    public void run(RestxShell shell) throws Exception {
View Full Code Here

Examples of restx.shell.StdShellCommand

            }
        };
    }

    @Provides public ShellCommand ls() {
        return new StdShellCommand(ImmutableList.of("ls"), "print current directory content") {
            @Override
            protected Optional<? extends ShellCommandRunner> doMatch(String line) {
                return Optional.of(new ShellCommandRunner() {
                    @Override
                    public void run(RestxShell shell) throws Exception {
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.