version 1.7, 2009/11/13 19:53:29 |
version 1.8, 2011/01/04 00:42:46 |
|
|
|
|
const struct cmd_entry cmd_kill_window_entry = { |
const struct cmd_entry cmd_kill_window_entry = { |
"kill-window", "killw", |
"kill-window", "killw", |
|
"t:", 0, 0, |
CMD_TARGET_WINDOW_USAGE, |
CMD_TARGET_WINDOW_USAGE, |
0, "", |
0, |
cmd_target_init, |
NULL, |
cmd_target_parse, |
NULL, |
cmd_kill_window_exec, |
cmd_kill_window_exec |
cmd_target_free, |
|
cmd_target_print |
|
}; |
}; |
|
|
int |
int |
cmd_kill_window_exec(struct cmd *self, struct cmd_ctx *ctx) |
cmd_kill_window_exec(struct cmd *self, struct cmd_ctx *ctx) |
{ |
{ |
struct cmd_target_data *data = self->data; |
struct args *args = self->args; |
struct winlink *wl; |
struct winlink *wl; |
|
|
if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL) |
if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) |
return (-1); |
return (-1); |
|
|
server_kill_window(wl->window); |
server_kill_window(wl->window); |