Add source code.
This commit is contained in:
1 parent
dab19ace02
commit
0b8a7b3cdc
31 files changed
+2809
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "CommandSpec.h"
|
||||
#include "Completion.h"
|
||||
#include "Database.h"
|
||||
|
||||
// Works out tab-completion candidates for the text typed so far: command
|
||||
// words first, then arguments (task names, account names, statuses, ...).
|
||||
class Completer {
|
||||
public:
|
||||
Completer(const Database& db, const std::vector<CommandSpec>& specs);
|
||||
|
||||
Completion complete(const std::string& textBeforeCursor) const;
|
||||
|
||||
private:
|
||||
std::vector<std::string> valuesFor(ArgKind kind, const std::string& current) const;
|
||||
|
||||
const Database& db_;
|
||||
const std::vector<CommandSpec>& specs_;
|
||||
};
|
||||
Reference in new issue
Block a user