diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-10-22 13:59:23 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-10-22 13:59:23 +0100 |
| commit | da7fc3311fba98bde4fbc3457fdbf2503fd2b4d0 (patch) | |
| tree | 8b373440e124829e0d72b03fe4f55c259b141b65 /src/command_manager.hh | |
| parent | e51ef6c3c29ca23c342776a19bdb9bcfc257875d (diff) | |
Pass ShellContext to commands
Fix #427
Diffstat (limited to 'src/command_manager.hh')
| -rw-r--r-- | src/command_manager.hh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh index d47dbdbc..f2d49761 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -19,11 +19,15 @@ namespace Kakoune class Context; using CommandParameters = ConstArrayView<String>; -using Command = std::function<void (const ParametersParser& parser, Context& context)>; +using Command = std::function<void (const ParametersParser& parser, + Context& context, + const ShellContext& shell_context)>; + using CommandCompleter = std::function<Completions (const Context& context, CompletionFlags, CommandParameters, size_t, ByteCount)>; + using CommandHelper = std::function<String (const Context& context, CommandParameters)>; enum class CommandFlags @@ -84,7 +88,9 @@ public: private: void execute_single_command(CommandParameters params, - Context& context, CharCoord pos) const; + Context& context, + const ShellContext& shell_context, + CharCoord pos) const; struct CommandDescriptor { |
