version 1.14, 2012/07/10 11:53:01 |
version 1.15, 2012/07/11 07:10:15 |
|
|
* List panes on given window. |
* List panes on given window. |
*/ |
*/ |
|
|
int cmd_list_panes_exec(struct cmd *, struct cmd_ctx *); |
enum cmd_retval cmd_list_panes_exec(struct cmd *, struct cmd_ctx *); |
|
|
void cmd_list_panes_server(struct cmd *, struct cmd_ctx *); |
void cmd_list_panes_server(struct cmd *, struct cmd_ctx *); |
void cmd_list_panes_session( |
void cmd_list_panes_session( |
|
|
cmd_list_panes_exec |
cmd_list_panes_exec |
}; |
}; |
|
|
int |
enum cmd_retval |
cmd_list_panes_exec(struct cmd *self, struct cmd_ctx *ctx) |
cmd_list_panes_exec(struct cmd *self, struct cmd_ctx *ctx) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
|
|
else if (args_has(args, 's')) { |
else if (args_has(args, 's')) { |
s = cmd_find_session(ctx, args_get(args, 't'), 0); |
s = cmd_find_session(ctx, args_get(args, 't'), 0); |
if (s == NULL) |
if (s == NULL) |
return (-1); |
return (CMD_RETURN_ERROR); |
cmd_list_panes_session(self, s, ctx, 1); |
cmd_list_panes_session(self, s, ctx, 1); |
} else { |
} else { |
wl = cmd_find_window(ctx, args_get(args, 't'), &s); |
wl = cmd_find_window(ctx, args_get(args, 't'), &s); |
if (wl == NULL) |
if (wl == NULL) |
return (-1); |
return (CMD_RETURN_ERROR); |
cmd_list_panes_window(self, s, wl, ctx, 0); |
cmd_list_panes_window(self, s, wl, ctx, 0); |
} |
} |
|
|
return (0); |
return (CMD_RETURN_NORMAL); |
} |
} |
|
|
void |
void |