[BACK]Return to cmd-list-sessions.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-list-sessions.c between version 1.26 and 1.27

version 1.26, 2016/10/14 22:14:22 version 1.27, 2016/10/16 19:04:05
Line 36 
Line 36 
         "#{session_group}#{?session_grouped,),}"        \          "#{session_group}#{?session_grouped,),}"        \
         "#{?session_attached, (attached),}"          "#{?session_attached, (attached),}"
   
 static enum cmd_retval   cmd_list_sessions_exec(struct cmd *, struct cmd_q *);  static enum cmd_retval  cmd_list_sessions_exec(struct cmd *,
                               struct cmdq_item *);
   
 const struct cmd_entry cmd_list_sessions_entry = {  const struct cmd_entry cmd_list_sessions_entry = {
         .name = "list-sessions",          .name = "list-sessions",
Line 50 
Line 51 
 };  };
   
 static enum cmd_retval  static enum cmd_retval
 cmd_list_sessions_exec(struct cmd *self, struct cmd_q *cmdq)  cmd_list_sessions_exec(struct cmd *self, struct cmdq_item *item)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         struct session          *s;          struct session          *s;
Line 64 
Line 65 
   
         n = 0;          n = 0;
         RB_FOREACH(s, sessions, &sessions) {          RB_FOREACH(s, sessions, &sessions) {
                 ft = format_create(cmdq, 0);                  ft = format_create(item, 0);
                 format_add(ft, "line", "%u", n);                  format_add(ft, "line", "%u", n);
                 format_defaults(ft, NULL, s, NULL, NULL);                  format_defaults(ft, NULL, s, NULL, NULL);
   
                 line = format_expand(ft, template);                  line = format_expand(ft, template);
                 cmdq_print(cmdq, "%s", line);                  cmdq_print(item, "%s", line);
                 free(line);                  free(line);
   
                 format_free(ft);                  format_free(ft);

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27