CmdCompletionContext: Implement the context completion list
This commit is contained in:
committed by
Paul Beckingham
parent
edb54a51b3
commit
5f3dd43893
@@ -220,7 +220,11 @@ CmdCompletionContext::CmdCompletionContext ()
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdCompletionContext::execute (std::string& output)
|
int CmdCompletionContext::execute (std::string& output)
|
||||||
{
|
{
|
||||||
std::vector <std::string> contexts;
|
std::vector <std::string> userContexts = CmdContext::getContexts ();
|
||||||
|
|
||||||
|
std::vector <std::string>::iterator userContext;
|
||||||
|
for (userContext = userContexts.begin (); userContext != userContexts.end (); ++userContext)
|
||||||
|
output += *userContext + "\n";
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
CmdContext ();
|
CmdContext ();
|
||||||
int execute (std::string&);
|
int execute (std::string&);
|
||||||
std::string joinWords (std::vector <std::string>& words, unsigned int from, unsigned int to = 0);
|
std::string joinWords (std::vector <std::string>& words, unsigned int from, unsigned int to = 0);
|
||||||
std::vector <std::string> getContexts ();
|
static std::vector <std::string> getContexts ();
|
||||||
int defineContext (std::vector <std::string>& words, std::stringstream& out);
|
int defineContext (std::vector <std::string>& words, std::stringstream& out);
|
||||||
int deleteContext (std::vector <std::string>& words, std::stringstream& out);
|
int deleteContext (std::vector <std::string>& words, std::stringstream& out);
|
||||||
int listContexts (std::vector <std::string>& words, std::stringstream& out);
|
int listContexts (std::vector <std::string>& words, std::stringstream& out);
|
||||||
|
|||||||
Reference in New Issue
Block a user