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

Diff for /src/usr.bin/tmux/cmd-show-options.c between version 1.19 and 1.20

version 1.19, 2013/03/24 09:54:10 version 1.20, 2013/03/25 10:04:04
Line 30 
Line 30 
 enum cmd_retval  cmd_show_options_exec(struct cmd *, struct cmd_q *);  enum cmd_retval  cmd_show_options_exec(struct cmd *, struct cmd_q *);
   
 enum cmd_retval cmd_show_options_one(struct cmd *, struct cmd_q *,  enum cmd_retval cmd_show_options_one(struct cmd *, struct cmd_q *,
                     struct options *);                      struct options *, int);
 enum cmd_retval cmd_show_options_all(struct cmd *, struct cmd_q *,  enum cmd_retval cmd_show_options_all(struct cmd *, struct cmd_q *,
                     const struct options_table_entry *, struct options *);                      const struct options_table_entry *, struct options *);
   
 const struct cmd_entry cmd_show_options_entry = {  const struct cmd_entry cmd_show_options_entry = {
         "show-options", "show",          "show-options", "show",
         "gst:vw", 0, 1,          "gqst:vw", 0, 1,
         "[-gsvw] [-t target-session|target-window] [option]",          "[-gqsvw] [-t target-session|target-window] [option]",
         0,          0,
         NULL,          NULL,
         NULL,          NULL,
Line 62 
Line 62 
         struct winlink                          *wl;          struct winlink                          *wl;
         const struct options_table_entry        *table;          const struct options_table_entry        *table;
         struct options                          *oo;          struct options                          *oo;
           int                                      quiet;
   
         if (args_has(self->args, 's')) {          if (args_has(self->args, 's')) {
                 oo = &global_options;                  oo = &global_options;
Line 89 
Line 90 
                 }                  }
         }          }
   
         if (args->argc != 0)          quiet = args_has(self->args, 'q');
                 return (cmd_show_options_one(self, cmdq, oo));          if (args->argc == 0)
         else  
                 return (cmd_show_options_all(self, cmdq, table, oo));                  return (cmd_show_options_all(self, cmdq, table, oo));
           else
                   return (cmd_show_options_one(self, cmdq, oo, quiet));
 }  }
   
 enum cmd_retval  enum cmd_retval
 cmd_show_options_one(struct cmd *self, struct cmd_q *cmdq,  cmd_show_options_one(struct cmd *self, struct cmd_q *cmdq,
     struct options *oo)      struct options *oo, int quiet)
 {  {
         struct args                             *args = self->args;          struct args                             *args = self->args;
         const struct options_table_entry        *table, *oe;          const struct options_table_entry        *table, *oe;
Line 106 
Line 108 
   
         if (*args->argv[0] == '@') {          if (*args->argv[0] == '@') {
                 if ((o = options_find1(oo, args->argv[0])) == NULL) {                  if ((o = options_find1(oo, args->argv[0])) == NULL) {
                           if (quiet)
                                   return (CMD_RETURN_NORMAL);
                         cmdq_error(cmdq, "unknown option: %s", args->argv[0]);                          cmdq_error(cmdq, "unknown option: %s", args->argv[0]);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
Line 122 
Line 126 
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
         if (oe == NULL) {          if (oe == NULL) {
                   if (quiet)
                       return (CMD_RETURN_NORMAL);
                 cmdq_error(cmdq, "unknown option: %s", args->argv[0]);                  cmdq_error(cmdq, "unknown option: %s", args->argv[0]);
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20