summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-03-20 19:06:15 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-03-20 19:11:58 +0100
commit3883bffaccf5216dc6fe03cb2c16c6030f41cc8f (patch)
treec18ccc346430a444fef3fc831df5f5267f9f668d /src
parentd99fe87b43af1ecca7b61fbaba769aaed4475d03 (diff)
user defined hooks can access the hook parameter in shell with $kak_hook_param
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc3
1 files changed, 2 insertions, 1 deletions
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];