Add source code.

This commit is contained in:
alejo committed 2026-10-17 03:29:11 -03:00
1 parent dab19ace02
commit 0b8a7b3cdc
31 files changed
+2809

No files matched your search

+23
View File
@@ -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_;
};