diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-12 20:48:35 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-12 20:48:35 +0000 |
commit | a0f369aa3fe9f2d223f45123db952ba7889c3c01 (patch) | |
tree | 767f82392ea61745b49a9782a9af828dc3b76a5f /src/libutil/args.hh | |
parent | f8d562c0a7cef27c65d3cff96ad8ef384f05b331 (diff) | |
parent | 20d2140e450b066a521933dd322d089fd6c248fa (diff) |
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libutil/args.hh')
-rw-r--r-- | src/libutil/args.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh index f41242e17..26f1bc11b 100644 --- a/src/libutil/args.hh +++ b/src/libutil/args.hh @@ -283,7 +283,17 @@ typedef std::vector<std::pair<std::string, std::string>> Table2; void printTable(std::ostream & out, const Table2 & table); -extern std::shared_ptr<std::set<std::string>> completions; +struct Completion { + std::string completion; + std::string description; + + bool operator<(const Completion & other) const; +}; +class Completions : public std::set<Completion> { +public: + void add(std::string completion, std::string description = ""); +}; +extern std::shared_ptr<Completions> completions; extern bool pathCompletions; std::optional<std::string> needsCompletion(std::string_view s); |