From d17aa59c3e7646667f70601eb7fc4ff11ada7604 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 12 Feb 2013 11:11:34 +0100 Subject: VTY: don't show HIDDEN or DEPRECATED vty commands in ? completion This hides HIDDEN or DEPRECATED commands from showing up when the full list of commands is inquired with '?' at any given point in the command tree. Only if the hidden/deprecated command is already typed in partially, then it will still tab-complete. --- src/vty/command.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/vty/command.c b/src/vty/command.c index ac731ee0..4f47a6be 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -1600,6 +1600,9 @@ cmd_describe_command_real(vector vline, struct vty *vty, int *status) if (!cmd_element) continue; + if (cmd_element->attr & (CMD_ATTR_DEPRECATED|CMD_ATTR_HIDDEN)) + continue; + strvec = cmd_element->strvec; /* if command is NULL, index may be equal to vector_active */ -- cgit v1.2.3