private void RunTokenisedCommandBuffer(CommandInterpreter interpreter) { ShellContext ctx = new ShellContext(this); foreach (var token in interpreter.ParsedTokens) { token.Execute(ctx); WriteSeparator(); } }
public void Execute(ShellContext ctx) { string cmd = m_args[0]; m_args.RemoveAt(0); if (ctx.Environment.BuiltInCommandExists(cmd)) { ctx.Environment.ExecBuiltInCommand(cmd, m_args.ToArray()); } else { var path = ctx.Environment.FindApplicationInPath(cmd); if (string.IsNullOrEmpty(path)) { ShellEnvironment.WriteErrorLine($"{cmd} is not a built-in command and could not be found on the PATH or in the current directory."); } else { ctx.Environment.RunProgram(cmd, m_args.ToArray()); } } }
public void Execute(ShellContext ctx) { }