mirror of https://gerrit.osmocom.org/libosmocore
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.
This commit is contained in:
parent
80d30fe803
commit
d17aa59c3e
|
@ -1600,6 +1600,9 @@ cmd_describe_command_real(vector vline, struct vty *vty, int *status)
|
||||||
if (!cmd_element)
|
if (!cmd_element)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (cmd_element->attr & (CMD_ATTR_DEPRECATED|CMD_ATTR_HIDDEN))
|
||||||
|
continue;
|
||||||
|
|
||||||
strvec = cmd_element->strvec;
|
strvec = cmd_element->strvec;
|
||||||
|
|
||||||
/* if command is NULL, index may be equal to vector_active */
|
/* if command is NULL, index may be equal to vector_active */
|
||||||
|
|
Loading…
Reference in New Issue