From: Quentin Young Date: Thu, 10 Nov 2016 23:30:20 +0000 (+0000) Subject: lib: Update `list [permutations]` X-Git-Tag: frr-3.0-branchpoint~129^2~40 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7a4662b4a924909210a7b38c2ca9da7c8fbbc574;p=matthieu%2Ffrr.git lib: Update `list [permutations]` Don't show hidden or deprecated commands. Signed-off-by: Quentin Young --- 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;