diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-11-10 23:30:20 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-11-10 23:30:20 +0000 |
| commit | 7a4662b4a924909210a7b38c2ca9da7c8fbbc574 (patch) | |
| tree | f1cbd1bbd1e28e70e4699c37704fc80dfb5d3f4f /lib/command.c | |
| parent | 14fe9c15254206a262a11f3eeccd2a59bdac0c07 (diff) | |
lib: Update `list [permutations]`
Don't show hidden or deprecated commands.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 5 |
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; |
