From 3883bffaccf5216dc6fe03cb2c16c6030f41cc8f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 20 Mar 2013 19:06:15 +0100 Subject: [PATCH] user defined hooks can access the hook parameter in shell with $kak_hook_param --- src/commands.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index c4944c7d..25be78a4 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -346,7 +346,8 @@ void add_hook(const CommandParameters& params, Context& context) String command = params[3]; auto hook_func = [=](const String& param, Context& context) { if (boost::regex_match(param.begin(), param.end(), regex)) - CommandManager::instance().execute(command, context); + CommandManager::instance().execute(command, context, {}, + { { "hook_param", param } }); }; const String& scope = params[0];