summaryrefslogtreecommitdiff
path: root/src/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c
index 4b233b2..fcf53e2 100644
--- a/src/command.c
+++ b/src/command.c
@@ -64,3 +64,14 @@ struct command *lookup_command_by_hash(struct commands *commands,
return NULL;
}
+
+int32_t execute_command(struct command *command, struct buffer *current_buffer,
+ int argc, const char *argv[]) {
+
+ command->fn((struct command_ctx){.current_buffer = current_buffer,
+ .userdata = command->userdata},
+ argc, argv);
+
+ // TODO
+ return 0;
+}