From a38a9c3bf20e13ac47933e337d44943bf157ce35 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 6 Aug 2012 22:02:11 +0200 Subject: Commands take a mutable context, main_context is gone ! --- src/command_manager.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/command_manager.hh') diff --git a/src/command_manager.hh b/src/command_manager.hh index 298b9056..113bac3e 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -24,7 +24,7 @@ struct wrong_argument_count : runtime_error using CommandParameters = memoryview; typedef std::function Command; + Context& context)> Command; typedef std::function { public: - void execute(const String& command_line, const Context& context, + void execute(const String& command_line, Context& context, const EnvVarMap& env_vars = EnvVarMap()); Completions complete(const Context& context, @@ -70,7 +70,7 @@ public: private: void execute_single_command(const CommandParameters& params, - const Context& context) const; + Context& context) const; struct CommandDescriptor { Command command; -- cgit v1.2.3