mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CmdCompletionContext: Implement the context completion list
This commit is contained in:
parent
edb54a51b3
commit
5f3dd43893
2 changed files with 6 additions and 2 deletions
|
@ -220,7 +220,11 @@ CmdCompletionContext::CmdCompletionContext ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
CmdContext ();
|
||||
int execute (std::string&);
|
||||
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 deleteContext (std::vector <std::string>& words, std::stringstream& out);
|
||||
int listContexts (std::vector <std::string>& words, std::stringstream& out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue