config: tokenize key bindings' pipe command when loading the configuration

This allows us to detect syntax errors early on, and is also more
efficient since we don't have to re-tokenize the command line every
time the binding is executed.
This commit is contained in:
Daniel Eklöf 2020-07-30 18:53:51 +02:00
parent 6a186cb356
commit 7767041c2c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 50 additions and 65 deletions

View file

@ -17,7 +17,10 @@ struct config_font {
struct config_key_binding_normal {
enum bind_action_normal action;
char *key;
char *pipe_cmd;
struct {
char *cmd;
char **argv;
} pipe;
};
struct config_key_binding_search {