From ebf94bc9cba6c41074fdfa1d1084ad5fff43fc24 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 22 May 2012 11:35:37 +0000 Subject: Switch all of the various choose- and list- commands over to the format infrastructure, from Thomas Adam. --- cmd-list-sessions.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'cmd-list-sessions.c') diff --git a/cmd-list-sessions.c b/cmd-list-sessions.c index 10e6b16d..7dabfc08 100644 --- a/cmd-list-sessions.c +++ b/cmd-list-sessions.c @@ -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) { -- cgit v1.2.3