summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorpaul <paul>2005-03-09 13:42:23 +0000
committerpaul <paul>2005-03-09 13:42:23 +0000
commit4275b1de3a54650a81f82999c296b756ee5b5679 (patch)
tree34770ac1723285391c43a623028fd1e8e6c986ed /lib/command.c
parent9e92eeab6cc40bc65ed9b1b7950e161fd1434d48 (diff)
2005-03-09 Paul Jakma <paul.jakma@sun.com>
* command.c: (config_list_cmd) Don't list hidden or deprecated commands, hiding these from tab completion is still to be done.
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 627be328..abd7106e 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1,5 +1,5 @@
/*
- $Id: command.c,v 1.42 2005/03/09 13:39:26 paul Exp $
+ $Id: command.c,v 1.43 2005/03/09 13:42:23 paul Exp $
Command interpreter routine for virtual terminal [aka TeletYpe]
Copyright (C) 1997, 98, 99 Kunihiro Ishiguro
@@ -2483,7 +2483,9 @@ DEFUN (config_list,
struct cmd_element *cmd;
for (i = 0; i < vector_max (cnode->cmd_vector); i++)
- if ((cmd = vector_slot (cnode->cmd_vector, i)) != NULL)
+ if ((cmd = vector_slot (cnode->cmd_vector, i)) != NULL
+ && !(cmd->attr == CMD_ATTR_DEPRECATED
+ || cmd->attr == CMD_ATTR_HIDDEN))
vty_out (vty, " %s%s", cmd->string,
VTY_NEWLINE);
return CMD_SUCCESS;