diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-17 19:31:06 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-17 19:31:06 +0000 |
commit | 801e6d96d878c3752048006b3a3c284b09a4c092 (patch) | |
tree | f9f05cc068effb83485bfaad33a4d8c4474c8209 /src/libutil/args.hh | |
parent | 2c9a8e7421408b1c98b04f258540749bb4f686e1 (diff) | |
parent | d334fd48824b41b57e267cd2926fa9619b7718e3 (diff) |
Merge commit 'd334fd48824b41b57e267cd2926fa9619b7718e3' into auto-uid-allocation
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); |