version 1.44, 2016/10/09 08:06:51 |
version 1.45, 2016/10/10 21:51:39 |
|
|
* Executes a tmux command if a shell command returns true or false. |
* Executes a tmux command if a shell command returns true or false. |
*/ |
*/ |
|
|
enum cmd_retval cmd_if_shell_exec(struct cmd *, struct cmd_q *); |
static enum cmd_retval cmd_if_shell_exec(struct cmd *, struct cmd_q *); |
|
|
void cmd_if_shell_callback(struct job *); |
static void cmd_if_shell_callback(struct job *); |
void cmd_if_shell_done(struct cmd_q *); |
static void cmd_if_shell_done(struct cmd_q *); |
void cmd_if_shell_free(void *); |
static void cmd_if_shell_free(void *); |
|
|
const struct cmd_entry cmd_if_shell_entry = { |
const struct cmd_entry cmd_if_shell_entry = { |
.name = "if-shell", |
.name = "if-shell", |
|
|
int references; |
int references; |
}; |
}; |
|
|
enum cmd_retval |
static enum cmd_retval |
cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq) |
cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
|
|
return (CMD_RETURN_WAIT); |
return (CMD_RETURN_WAIT); |
} |
} |
|
|
void |
static void |
cmd_if_shell_callback(struct job *job) |
cmd_if_shell_callback(struct job *job) |
{ |
{ |
struct cmd_if_shell_data *cdata = job->data; |
struct cmd_if_shell_data *cdata = job->data; |
|
|
cmd_list_free(cmdlist); |
cmd_list_free(cmdlist); |
} |
} |
|
|
void |
static void |
cmd_if_shell_done(struct cmd_q *cmdq1) |
cmd_if_shell_done(struct cmd_q *cmdq1) |
{ |
{ |
struct cmd_if_shell_data *cdata = cmdq1->data; |
struct cmd_if_shell_data *cdata = cmdq1->data; |
|
|
free(cdata); |
free(cdata); |
} |
} |
|
|
void |
static void |
cmd_if_shell_free(void *data) |
cmd_if_shell_free(void *data) |
{ |
{ |
struct cmd_if_shell_data *cdata = data; |
struct cmd_if_shell_data *cdata = data; |