diff options
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c index 50ed6d35..1aeae0f9 100644 --- a/src/commands.c +++ b/src/commands.c @@ -55,6 +55,16 @@ commands_simple_command(KeyMap *km, const char *argument) { completion_clean_autocompletion(); } + if (EMIT_SCRIPT(EXECUTE_COMMAND)) + { + char *json = util_create_json(3, + CHAR, "command", km->map->n.first, + CHAR, "argument", argument, + INTEGER, "nummod", dwb.state.nummod); + + ScriptSignal sig = { .jsobj = NULL, SCRIPTS_SIG_META(json, EXECUTE_COMMAND, 0) }; + SCRIPTS_EMIT_RETURN_ARG(sig, json, STATUS_OK); + } ret = func(km, arg); switch (ret) |