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 { ...@@ -69,9 +69,11 @@ public class ApplicationsListCommand extends AbstractShellCommand {
69 boolean isActive = service.getState(app.id()) == ACTIVE; 69 boolean isActive = service.getState(app.id()) == ACTIVE;
70 if (activeOnly && isActive || !activeOnly) { 70 if (activeOnly && isActive || !activeOnly) {
71 if (shortOnly) { 71 if (shortOnly) {
72 + String shortDescription = app.title().equals(app.id().name()) ?
73 + app.description().replaceAll("[\\r\\n]", " ").replaceAll(" +", " ") :
74 + app.title();
72 print(SHORT_FMT, isActive ? "*" : " ", 75 print(SHORT_FMT, isActive ? "*" : " ",
73 - app.id().id(), app.id().name(), app.version(), 76 + app.id().id(), app.id().name(), app.version(), shortDescription);
74 - app.description().replaceAll("[\\r\\n]", " ").replaceAll(" +", " "));
75 } else { 77 } else {
76 print(FMT, isActive ? "*" : " ", 78 print(FMT, isActive ? "*" : " ",
77 app.id().id(), app.id().name(), app.version(), app.origin(), 79 app.id().id(), app.id().name(), app.version(), app.origin(),
......