diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-03 00:29:51 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-03 02:03:15 +0300 |
| commit | c22789620db38f388e5800d6d0e3b708b44be2f5 (patch) | |
| tree | a64027d2ac901f11326511fc7c972d309c8cf5c1 /lib/command.c | |
| parent | d532d1092e165dc9b7164039c0366c4f2856c9f9 (diff) | |
lib, vtysh: reduce code duplication
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c index 7fb405bdfb..a5b62e9076 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2231,11 +2231,7 @@ DEFUN (no_banner_motd, return CMD_SUCCESS; } -DEFUN(find, - find_cmd, - "find REGEX...", - "Find CLI command matching a regular expression\n" - "Search pattern (POSIX regex)\n") +int cmd_find_cmds(struct vty *vty, struct cmd_token **argv, int argc) { const struct cmd_node *node; const struct cmd_element *cli; @@ -2313,6 +2309,15 @@ done: return CMD_SUCCESS; } +DEFUN(find, + find_cmd, + "find REGEX...", + "Find CLI command matching a regular expression\n" + "Search pattern (POSIX regex)\n") +{ + return cmd_find_cmds(vty, argv, argc); +} + #if defined(DEV_BUILD) && defined(HAVE_SCRIPTING) DEFUN(script, script_cmd, |
