return new SimpleAutoCompleter();
}
@Override
public void formatRaw(Object o, PrintWriter writer) {
JobDataList jobs = (JobDataList) o;
switch (getFormat()) {
case JSON:
JsonHelper<JobDataList> jsonHelper = JsonHelper.build(JobDataList.class);
boolean formatted = true;
try {
String json = jsonHelper.marshal(jobs, formatted);
writer.println(json);
return;
} catch (IOException e) {
throw new CliException("Error formatting for output", e);
}
}
Ansi ansi = new Ansi(writer);
for (JobData job : jobs.getJobs()) {
// JobState state = job.state;
// if (state != null) {
// ansi.setColorBlue();
// switch (job.state) {
// case FAILED: