aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-10 15:48:14 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-10 15:48:14 +0000
commit8ba089597fa19bfd49ba5f22a5e821740ca4eb5d (patch)
treeb4f2299b9c973ef7636f8ce1bab0299dee4cc389 /src/libutil/args.hh
parent13b6b645897fd2edaa0f09fa48d6fe8dd6287b55 (diff)
parent4d98143914120d0163f5c50f30ce8a5289433f8f (diff)
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libutil/args.hh')
-rw-r--r--src/libutil/args.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh
index 7521b3065..fdd036f9a 100644
--- a/src/libutil/args.hh
+++ b/src/libutil/args.hh
@@ -158,7 +158,7 @@ public:
}
/* Expect a string argument. */
- void expectArg(const std::string & label, string * dest, bool optional = false)
+ void expectArg(const std::string & label, std::string * dest, bool optional = false)
{
expectArgs({
.label = label,
@@ -237,7 +237,13 @@ public:
void add(std::string completion, std::string description = "");
};
extern std::shared_ptr<Completions> completions;
-extern bool pathCompletions;
+
+enum CompletionType {
+ ctNormal,
+ ctFilenames,
+ ctAttrs
+};
+extern CompletionType completionType;
std::optional<std::string> needsCompletion(std::string_view s);