public CommandInvoker<Void, Chunk> create(CRaSHSession session) throws NoSuchCommandException { // LinkedList<CommandInvoker> pipes = new LinkedList<CommandInvoker>(); for (PipeLineFactory current = this;current != null;current = current.next) { CommandInvoker commandInvoker = null; if (current.name != null) { ShellCommand command = session.crash.getCommand(current.name); if (command != null) { commandInvoker = command.resolveInvoker(current.rest); } } if (commandInvoker == null) { throw new NoSuchCommandException(current.name); } pipes.add(commandInvoker); } // return new PipeLine(pipes.toArray(new CommandInvoker[pipes.size()])); }
man.append(cmd.describe(s, DescriptionFormat.MAN));
ShellCommand command = crash.getCommand(commandName); if (command != null) { completion = command.complete(new BaseRuntimeContext(this, crash.context.getAttributes()), termPrefix); } else { completion = new CompletionMatch(Delimiter.EMPTY, Completion.create());
CommandInvoker<Void, Void> invoker = (CommandInvoker<Void, Void>)command.resolveInvoker(name, invokerOptions, invokerArgs);