} catch (NotRegisteredException e) {
// Ignore those exceptions (command will not be displayed)
}
}
else if (child instanceof AliasNode) {
AliasNode node = (AliasNode) child;
String name = StringUtils.rightPad(node.getName(), maxNameLen);
String cmd = layoutManager.findNode(group, node.getCommand()).getName();
io.out.print(" ");
io.out.print(renderer.render(Renderer.encode(name, Code.BOLD)));
io.out.print(" ");
io.out.print("Alias to: ");
io.out.println(renderer.render(Renderer.encode(cmd, Code.BOLD)));
} else if (child instanceof GroupNode) {
hasShells = true;
}
}
io.out.println();
if (hasShells) {
io.out.println("Available shells:");
// Then groups
for (Node child : nodes) {
if (child instanceof GroupNode) {
GroupNode node = (GroupNode) child;
io.out.print(" ");
io.out.println(renderer.render(Renderer.encode(node.getName(), Code.BOLD)));
}
}
io.out.println();
}
}