Andrea Campanella
Committed by Gerrit Code Review

Changing application description in CLI is -s is provided to shortest possibile

Change-Id: I12aed55fbd0cb68ce356bd8ecfe512bc11537f10
......@@ -69,9 +69,11 @@ public class ApplicationsListCommand extends AbstractShellCommand {
boolean isActive = service.getState(app.id()) == ACTIVE;
if (activeOnly && isActive || !activeOnly) {
if (shortOnly) {
String shortDescription = app.title().equals(app.id().name()) ?
app.description().replaceAll("[\\r\\n]", " ").replaceAll(" +", " ") :
app.title();
print(SHORT_FMT, isActive ? "*" : " ",
app.id().id(), app.id().name(), app.version(),
app.description().replaceAll("[\\r\\n]", " ").replaceAll(" +", " "));
app.id().id(), app.id().name(), app.version(), shortDescription);
} else {
print(FMT, isActive ? "*" : " ",
app.id().id(), app.id().name(), app.version(), app.origin(),
......