diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2021-04-13 02:22:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-13 02:22:46 +0200 |
| commit | 1df904706ceed31cb6d4cb6af096ac4664140b55 (patch) | |
| tree | 2d2962cb55355a181b21fcfb97c963d430112d6f /lib/command.c | |
| parent | 9c2a14e7538bd0c55253475cff632a6c5627f9b9 (diff) | |
| parent | fdd40d514dd34d8736908bff27ffb01f88aa238a (diff) | |
Merge pull request #8288 from qlyoung/readd-space-support-to-find-command
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c index 770e2fc5ac..d2798b5002 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2226,18 +2226,19 @@ DEFUN (no_banner_motd, DEFUN(find, find_cmd, - "find REGEX", + "find REGEX...", "Find CLI command matching a regular expression\n" "Search pattern (POSIX regex)\n") { - char *pattern = argv[1]->arg; const struct cmd_node *node; const struct cmd_element *cli; vector clis; regex_t exp = {}; + char *pattern = argv_concat(argv, argc, 1); int cr = regcomp(&exp, pattern, REG_NOSUB | REG_EXTENDED); + XFREE(MTYPE_TMP, pattern); if (cr != 0) { switch (cr) { |
