summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index c0b9ee4e10..9eb43db94f 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1242,7 +1242,10 @@ permute (struct graph_node *start, struct vty *vty)
{
struct graph_node *gn = vector_slot (start->to, i);
struct cmd_token *tok = gn->data;
- if (tok->type == END_TKN || gn == start)
+ if (tok->attr == CMD_ATTR_HIDDEN ||
+ tok->attr == CMD_ATTR_DEPRECATED)
+ continue;
+ else if (tok->type == END_TKN || gn == start)
{
struct graph_node *gnn;
struct listnode *ln;