Switch all of the various choose- and list- commands over to the format

infrastructure, from Thomas Adam.
This commit is contained in:
Nicholas Marriott
2012-05-22 11:35:37 +00:00
parent 682884edc5
commit ebf94bc9cb
16 changed files with 211 additions and 112 deletions

View File

@@ -49,14 +49,8 @@ cmd_list_sessions_exec(struct cmd *self, struct cmd_ctx *ctx)
const char *template;
char *line;
template = args_get(args, 'F');
if (template == NULL) {
template = "#{session_name}: #{session_windows} windows "
"(created #{session_created_string}) [#{session_width}x"
"#{session_height}]#{?session_grouped, (group ,}"
"#{session_group}#{?session_grouped,),}"
"#{?session_attached, (attached),}";
}
if ((template = args_get(args, 'F')) == NULL)
template = DEFAULT_SESSION_TEMPLATE;
n = 0;
RB_FOREACH(s, sessions, &sessions) {