From 4554b70a9715d72ca1cb8043f55b3c9fe09b6ef2 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 27 Oct 2014 15:48:52 +0100 Subject: [PATCH] Cli: Fix repository remove auto-complete suggestions refs #7255 --- lib/cli/repositoryobjectcommand.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/cli/repositoryobjectcommand.cpp b/lib/cli/repositoryobjectcommand.cpp index cddbc7c40..c2a67521c 100644 --- a/lib/cli/repositoryobjectcommand.cpp +++ b/lib/cli/repositoryobjectcommand.cpp @@ -130,6 +130,20 @@ std::vector RepositoryObjectCommand::GetPositionalSuggestions(const Stri const Type *ptype = Type::GetByName(m_Type); ASSERT(ptype); return GetFieldCompletionSuggestions(ptype, word); + } else if (m_Command == RepositoryCommandRemove) { + std::vector suggestions; + + String argName = "name="; + if (argName.Find(word) == 0) + suggestions.push_back(argName); + + if (m_Type == "Service") { + String argHostName = "host_name="; + if (argHostName.Find(word) == 0) + suggestions.push_back(argHostName); + } + + return suggestions; } else return CLICommand::GetPositionalSuggestions(word); } -- 2.40.0