summaryrefslogtreecommitdiff
path: root/src/parameters_parser.hh
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2023-02-12 20:51:28 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2023-02-17 20:50:58 +0100
commit213ea922b16bf95c5b441ce2cae2de6d221f638a (patch)
tree96cc2e01ea2702c7e9c480e5bee6538fefb6b816 /src/parameters_parser.hh
parent9e0502a1ca234bd20e17f078e75c3d5da4687a82 (diff)
Complete arguments to "echo -to-file"
Including this here because grandparent parent commit broke completions for "edit -fifo".
Diffstat (limited to 'src/parameters_parser.hh')
-rw-r--r--src/parameters_parser.hh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/parameters_parser.hh b/src/parameters_parser.hh
index 680c6f93..86ba88ce 100644
--- a/src/parameters_parser.hh
+++ b/src/parameters_parser.hh
@@ -10,6 +10,8 @@
#include "string.hh"
#include "string_utils.hh"
+#include <functional>
+
namespace Kakoune
{
@@ -37,9 +39,15 @@ struct wrong_argument_count : public parameter_error
wrong_argument_count() : parameter_error("wrong argument count") {}
};
+class Context;
+struct Completions;
+enum class CompletionFlags;
+using ArgCompleter = std::function<Completions (const Context&, CompletionFlags,
+ StringView, ByteCount)>;
+
struct SwitchDesc
{
- bool takes_arg;
+ Optional<ArgCompleter> arg_completer;
String description;
};