summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2017-01-24 03:10:55 +0100
committerGitHub <noreply@github.com>2017-01-24 03:10:55 +0100
commita9636cda9ffcbaa7e100da00ca6531fb08763534 (patch)
tree22c657114ae03ee4c084f90ad50cf438eaab7e80 /lib/command.c
parente5fe6d593123657f82786d568a9e8969dda35e59 (diff)
parent5320569435c057a4e209700bdad71256432536fc (diff)
Merge pull request #96 from qlyoung/guard-strict-dedup
lib: guard strict cli completions
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index 6294e994e7..b5dae5f28e 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -541,8 +541,12 @@ completions_to_vec (struct list *completions)
for (i = 0; i < vector_active (comps) && !exists; i++)
{
struct cmd_token *curr = vector_slot (comps, i);
+#ifdef VTYSH_DEBUG
exists = !strcmp (curr->text, token->text) &&
!strcmp (curr->desc, token->desc);
+#else
+ exists = !strcmp (curr->text, token->text);
+#endif /* VTYSH_DEBUG */
}
if (!exists)