diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2018-10-18 23:16:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 23:16:04 +0100 |
commit | 7e1c122027902f05934c1b700e3697d2451536dc (patch) | |
tree | 4c1e2390842c370aea555231d7914df5cc7b2d97 /src/commands.c | |
parent | 7221ef8319ad88c9ab81e7734e89b8debfe861b4 (diff) | |
parent | 51837d93572fe229275d239c7a8d4113ef81ea38 (diff) | |
download | imv-7e1c122027902f05934c1b700e3697d2451536dc.tar.gz |
Merge pull request #134 from Jeinzi/dev-jeinzi
Multiple commands per bind
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 7dfbc2c..0fb8b46 100644 --- a/src/commands.c +++ b/src/commands.c @@ -72,4 +72,14 @@ int imv_command_exec(struct imv_commands *cmds, const char *command, void *data) return ret; } +int imv_command_exec_list(struct imv_commands *cmds, struct list *commands, void *data) +{ + int ret = 0; + for(size_t i = 0; i < commands->len; ++i) { + const char *command = commands->items[i]; + ret += imv_command_exec(cmds, command, data); + } + return ret; +} + /* vim:set ts=2 sts=2 sw=2 et: */ |