VTY reference: do not list empty nodes
In 'show online-help' output, don't list nodes that have no commands (the
'Password' node).
Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c
diff --git a/src/vty/command.c b/src/vty/command.c
index e5efad2..7395711 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -685,6 +685,8 @@
cnode = vector_slot(cmdvec, i);
if (!cnode)
continue;
+ if (vector_active(cnode->cmd_vector) < 1)
+ continue;
/* De-dup node IDs: how many times has this same name been used before? Count the first
* occurence as _1 and omit that first suffix, so that the first occurence is called