summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2016-03-02 19:55:32 +0000
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-03-02 19:55:32 +0000
commitabaaab4e2d41fd71cdfbeb47ad8129dc59dddc99 (patch)
tree227582792eed16e44ccfcee1e5d1d1d2aa095caf /lib/command.c
parenta4499b8312f2c7fdc04d9aecbfd033ccf80eabe6 (diff)
vtysh: make HIDDEN commands work
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-9646
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index 14e888b9f3..16f53da3ab 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2191,7 +2191,9 @@ cmd_describe_command_real (vector vline, struct vty *vty, int *status)
/* Make description vector. */
for (i = 0; i < vector_active (matches); i++) {
- if ((cmd_element = vector_slot (cmd_vector, i)) != NULL)
+ if ((cmd_element = vector_slot (cmd_vector, i)) != NULL &&
+ !(cmd_element->attr == CMD_ATTR_DEPRECATED ||
+ cmd_element->attr == CMD_ATTR_HIDDEN))
{
unsigned int j;
vector vline_trimmed;